Commit bca3bffe authored by Chris Boot's avatar Chris Boot Committed by Linus Torvalds

[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: default avatarChris Boot <bootc@bootc.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a4afee02
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <linux/scx200_gpio.h> #include <linux/scx200_gpio.h>
#define DRVNAME "net48xx-led"
#define NET48XX_ERROR_LED_GPIO 20 #define NET48XX_ERROR_LED_GPIO 20
static struct platform_device *pdev; static struct platform_device *pdev;
...@@ -66,13 +67,13 @@ static int net48xx_led_remove(struct platform_device *pdev) ...@@ -66,13 +67,13 @@ static int net48xx_led_remove(struct platform_device *pdev)
} }
static struct platform_driver net48xx_led_driver = { static struct platform_driver net48xx_led_driver = {
.driver.owner = THIS_MODULE,
.probe = net48xx_led_probe, .probe = net48xx_led_probe,
.remove = net48xx_led_remove, .remove = net48xx_led_remove,
.suspend = net48xx_led_suspend, .suspend = net48xx_led_suspend,
.resume = net48xx_led_resume, .resume = net48xx_led_resume,
.driver = { .driver = {
.name = "net48xx-led", .name = DRVNAME,
.owner = THIS_MODULE,
}, },
}; };
...@@ -89,7 +90,7 @@ static int __init net48xx_led_init(void) ...@@ -89,7 +90,7 @@ static int __init net48xx_led_init(void)
if (ret < 0) if (ret < 0)
goto out; 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)) { if (IS_ERR(pdev)) {
ret = PTR_ERR(pdev); ret = PTR_ERR(pdev);
platform_driver_unregister(&net48xx_led_driver); platform_driver_unregister(&net48xx_led_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment