public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Boot <bootc@bootc.net>
To: kernel list <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>,
	ben-linux@fluff.org, rpurdie@rpsys.net,
	Jim Cromie <jim.cromie@gmail.com>
Subject: [PATCH] net48xx LED cleanups
Date: Tue, 11 Jul 2006 21:50:52 +0100	[thread overview]
Message-ID: <44B40F2C.1050309@bootc.net> (raw)

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 
(or whatever it's called).

Signed-off-by: Chris Boot <bootc@bootc.net>

diff --git a/drivers/leds/leds-net48xx.c b/drivers/leds/leds-net48xx.c
index 35ee52f..713c4a8 100644
--- a/drivers/leds/leds-net48xx.c
+++ b/drivers/leds/leds-net48xx.c
@@ -18,6 +18,7 @@
  #include <asm/io.h>
  #include <linux/scx200_gpio.h>

+#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 pla
  }

  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);

-- 
Chris Boot
bootc@bootc.net
http://www.bootc.net/

             reply	other threads:[~2006-07-11 20:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-11 20:50 Chris Boot [this message]
2006-07-11 20:53 ` [PATCH] net48xx LED cleanups Chris Boot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44B40F2C.1050309@bootc.net \
    --to=bootc@bootc.net \
    --cc=akpm@osdl.org \
    --cc=ben-linux@fluff.org \
    --cc=jim.cromie@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox