mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 15:49:56 +00:00
gpio: mockup: use KBUILD_MODNAME
Drop the definition for the driver name. Let's use KBUILD_MODNAME for the log format and use the "gpio-mockup" value directly in the only place where it's relevant: in the name of the device. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
94502ba9a4
commit
25f0006603
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include "gpiolib.h"
|
#include "gpiolib.h"
|
||||||
|
|
||||||
#define GPIO_MOCKUP_NAME "gpio-mockup"
|
|
||||||
#define GPIO_MOCKUP_MAX_GC 10
|
#define GPIO_MOCKUP_MAX_GC 10
|
||||||
/*
|
/*
|
||||||
* We're storing two values per chip: the GPIO base and the number
|
* We're storing two values per chip: the GPIO base and the number
|
||||||
@ -31,7 +30,7 @@
|
|||||||
/* Maximum of three properties + the sentinel. */
|
/* Maximum of three properties + the sentinel. */
|
||||||
#define GPIO_MOCKUP_MAX_PROP 4
|
#define GPIO_MOCKUP_MAX_PROP 4
|
||||||
|
|
||||||
#define gpio_mockup_err(...) pr_err(GPIO_MOCKUP_NAME ": " __VA_ARGS__)
|
#define gpio_mockup_err(...) pr_err(KBUILD_MODNAME ": " __VA_ARGS__)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* struct gpio_pin_status - structure describing a GPIO status
|
* struct gpio_pin_status - structure describing a GPIO status
|
||||||
@ -500,7 +499,7 @@ static int gpio_mockup_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
static struct platform_driver gpio_mockup_driver = {
|
static struct platform_driver gpio_mockup_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = GPIO_MOCKUP_NAME,
|
.name = "gpio-mockup",
|
||||||
},
|
},
|
||||||
.probe = gpio_mockup_probe,
|
.probe = gpio_mockup_probe,
|
||||||
};
|
};
|
||||||
@ -572,7 +571,7 @@ static int __init gpio_mockup_init(void)
|
|||||||
properties[prop++] = PROPERTY_ENTRY_BOOL(
|
properties[prop++] = PROPERTY_ENTRY_BOOL(
|
||||||
"named-gpio-lines");
|
"named-gpio-lines");
|
||||||
|
|
||||||
pdevinfo.name = GPIO_MOCKUP_NAME;
|
pdevinfo.name = "gpio-mockup";
|
||||||
pdevinfo.id = i;
|
pdevinfo.id = i;
|
||||||
pdevinfo.properties = properties;
|
pdevinfo.properties = properties;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user