Patchwork [13/32] rackmeter section fixes

login
register
mail settings
Submitter Al Viro
Date Nov. 22, 2008, 5:35 p.m.
Message ID <E1L3wOC-0006T5-Ji@ZenIV.linux.org.uk>
Download mbox | patch
Permalink /patch/10241/
State Accepted, archived
Commit 31421a6f6ea88236cb17b6a24aa21e66a6138d4c
Headers show

Comments

Al Viro - Nov. 22, 2008, 5:35 p.m.
* rackmeter_remove() reference needs devexit_p
* rackmeter_setup() is calls devinit and is called only from devinit

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 drivers/macintosh/rack-meter.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Benjamin Herrenschmidt - Nov. 22, 2008, 9:52 p.m.
On Sat, 2008-11-22 at 17:35 +0000, Al Viro wrote:
> * rackmeter_remove() reference needs devexit_p
> * rackmeter_setup() is calls devinit and is called only from devinit
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

>  drivers/macintosh/rack-meter.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c
> --- a/drivers/macintosh/rack-meter.c
> +++ b/drivers/macintosh/rack-meter.c
> @@ -288,7 +288,7 @@ static void __devexit rackmeter_stop_cpu_sniffer(struct rackmeter *rm)
>  	cancel_rearming_delayed_work(&rm->cpu[1].sniffer);
>  }
>  
> -static int rackmeter_setup(struct rackmeter *rm)
> +static int __devinit rackmeter_setup(struct rackmeter *rm)
>  {
>  	pr_debug("rackmeter: setting up i2s..\n");
>  	rackmeter_setup_i2s(rm);
> @@ -582,12 +582,12 @@ static struct of_device_id rackmeter_match[] = {
>  	{ }
>  };
>  
> -static struct macio_driver rackmeter_drv = {
> +static struct macio_driver rackmeter_driver = {
>  	.name = "rackmeter",
>  	.owner = THIS_MODULE,
>  	.match_table = rackmeter_match,
>  	.probe = rackmeter_probe,
> -	.remove = rackmeter_remove,
> +	.remove = __devexit_p(rackmeter_remove),
>  	.shutdown = rackmeter_shutdown,
>  };
>  
> @@ -596,14 +596,14 @@ static int __init rackmeter_init(void)
>  {
>  	pr_debug("rackmeter_init()\n");
>  
> -	return macio_register_driver(&rackmeter_drv);
> +	return macio_register_driver(&rackmeter_driver);
>  }
>  
>  static void __exit rackmeter_exit(void)
>  {
>  	pr_debug("rackmeter_exit()\n");
>  
> -	macio_unregister_driver(&rackmeter_drv);
> +	macio_unregister_driver(&rackmeter_driver);
>  }
>  
>  module_init(rackmeter_init);
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

Patch

diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c
--- a/drivers/macintosh/rack-meter.c
+++ b/drivers/macintosh/rack-meter.c
@@ -288,7 +288,7 @@  static void __devexit rackmeter_stop_cpu_sniffer(struct rackmeter *rm)
 	cancel_rearming_delayed_work(&rm->cpu[1].sniffer);
 }
 
-static int rackmeter_setup(struct rackmeter *rm)
+static int __devinit rackmeter_setup(struct rackmeter *rm)
 {
 	pr_debug("rackmeter: setting up i2s..\n");
 	rackmeter_setup_i2s(rm);
@@ -582,12 +582,12 @@  static struct of_device_id rackmeter_match[] = {
 	{ }
 };
 
-static struct macio_driver rackmeter_drv = {
+static struct macio_driver rackmeter_driver = {
 	.name = "rackmeter",
 	.owner = THIS_MODULE,
 	.match_table = rackmeter_match,
 	.probe = rackmeter_probe,
-	.remove = rackmeter_remove,
+	.remove = __devexit_p(rackmeter_remove),
 	.shutdown = rackmeter_shutdown,
 };
 
@@ -596,14 +596,14 @@  static int __init rackmeter_init(void)
 {
 	pr_debug("rackmeter_init()\n");
 
-	return macio_register_driver(&rackmeter_drv);
+	return macio_register_driver(&rackmeter_driver);
 }
 
 static void __exit rackmeter_exit(void)
 {
 	pr_debug("rackmeter_exit()\n");
 
-	macio_unregister_driver(&rackmeter_drv);
+	macio_unregister_driver(&rackmeter_driver);
 }
 
 module_init(rackmeter_init);