From bca3bffec9f37d4cb60b80fd0067f9c7550b5d57 Mon Sep 17 00:00:00 2001 From: Chris Boot Date: Fri, 14 Jul 2006 00:24:21 -0700 Subject: [PATCH] [PATCH] net48xx LED cleanups Add the DRVNAME define to remove the two separate references of the driver name by string, and move the .driver.owner into the existing .driver sub-structure. Signed-off-by: Chris Boot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/leds/leds-net48xx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/leds/leds-net48xx.c b/drivers/leds/leds-net48xx.c index 35ee52f9b79e..713c4a8aa77d 100644 --- a/drivers/leds/leds-net48xx.c +++ b/drivers/leds/leds-net48xx.c @@ -18,6 +18,7 @@ #include #include +#define DRVNAME "net48xx-led" #define NET48XX_ERROR_LED_GPIO 20 static struct platform_device *pdev; @@ -66,13 +67,13 @@ static int net48xx_led_remove(struct platform_device *pdev) } static struct platform_driver net48xx_led_driver = { - .driver.owner = THIS_MODULE, .probe = net48xx_led_probe, .remove = net48xx_led_remove, .suspend = net48xx_led_suspend, .resume = net48xx_led_resume, .driver = { - .name = "net48xx-led", + .name = DRVNAME, + .owner = THIS_MODULE, }, }; @@ -89,7 +90,7 @@ static int __init net48xx_led_init(void) if (ret < 0) goto out; - pdev = platform_device_register_simple("net48xx-led", -1, NULL, 0); + pdev = platform_device_register_simple(DRVNAME, -1, NULL, 0); if (IS_ERR(pdev)) { ret = PTR_ERR(pdev); platform_driver_unregister(&net48xx_led_driver); -- 2.30.2