diff options
author | Fabian Krueger <fabian.krueger@fau.de> | 2019-06-26 10:35:25 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-01 10:19:43 +0300 |
commit | 39e828584b390e612958e20ca308957001fcf854 (patch) | |
tree | 29cf017c875330632affdf09ec65f40a8189647d /drivers/staging/kpc2000 | |
parent | 69086fb80d09bf50a649cd74f28a44f60f420a42 (diff) | |
download | linux-39e828584b390e612958e20ca308957001fcf854.tar.xz |
staging: kpc2000: introduce __func__
Instead of using the function name hard coded as string, using __func__
and the '%s'-placeholder will always give the current name of the
function. When renaming a function, the debugging-messages won't have to
be rewritten.
Signed-off-by: Fabian Krueger <fabian.krueger@fau.de>
Signed-off-by: Michael Scheiderer <michael.scheiderer@fau.de>
Cc: <linux-kernel@i4.cs.fau.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/kpc2000')
-rw-r--r-- | drivers/staging/kpc2000/kpc2000_spi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c index 8a6fb2bde94f..68b01e2420d8 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -439,13 +439,14 @@ kp_spi_probe(struct platform_device *pldev) drvdata = pldev->dev.platform_data; if (!drvdata) { - dev_err(&pldev->dev, "kp_spi_probe: platform_data is NULL!\n"); + dev_err(&pldev->dev, "%s: platform_data is NULL\n", __func__); return -ENODEV; } master = spi_alloc_master(&pldev->dev, sizeof(struct kp_spi)); if (master == NULL) { - dev_err(&pldev->dev, "kp_spi_probe: master allocation failed\n"); + dev_err(&pldev->dev, "%s: master allocation failed\n", + __func__); return -ENOMEM; } @@ -469,7 +470,8 @@ kp_spi_probe(struct platform_device *pldev) r = platform_get_resource(pldev, IORESOURCE_MEM, 0); if (r == NULL) { - dev_err(&pldev->dev, "kp_spi_probe: Unable to get platform resources\n"); + dev_err(&pldev->dev, "%s: Unable to get platform resources\n", + __func__); status = -ENODEV; goto free_master; } |