All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] misc: ep93xx_pwm.c: fix section mismatch and use module_platform_driver
@ 2013-03-16  1:07 H Hartley Sweeten
  2013-03-16 14:57 ` Arnd Bergmann
  2013-03-25 20:17 ` Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: H Hartley Sweeten @ 2013-03-16  1:07 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Ryan Mallon, arnd, gregkh

Remove the __init tags from the ep93xx_pwm_probe() and
ep93xx_pwm_remove() functions to fix the section mismatch
warnings.

Use module_platform_driver() to remove the init/exit boilerplate.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/misc/ep93xx_pwm.c | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/drivers/misc/ep93xx_pwm.c b/drivers/misc/ep93xx_pwm.c
index 16d7179..4a674f6 100644
--- a/drivers/misc/ep93xx_pwm.c
+++ b/drivers/misc/ep93xx_pwm.c
@@ -269,7 +269,7 @@ static const struct attribute_group ep93xx_pwm_sysfs_files = {
 	.attrs	= ep93xx_pwm_attrs,
 };
 
-static int __init ep93xx_pwm_probe(struct platform_device *pdev)
+static int ep93xx_pwm_probe(struct platform_device *pdev)
 {
 	struct ep93xx_pwm *pwm;
 	struct resource *res;
@@ -339,7 +339,7 @@ fail_no_mem:
 	return err;
 }
 
-static int __exit ep93xx_pwm_remove(struct platform_device *pdev)
+static int ep93xx_pwm_remove(struct platform_device *pdev)
 {
 	struct ep93xx_pwm *pwm = platform_get_drvdata(pdev);
 	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -362,21 +362,10 @@ static struct platform_driver ep93xx_pwm_driver = {
 		.name	= "ep93xx-pwm",
 		.owner	= THIS_MODULE,
 	},
-	.remove		= __exit_p(ep93xx_pwm_remove),
+	.probe		= ep93xx_pwm_probe,
+	.remove		= ep93xx_pwm_remove,
 };
-
-static int __init ep93xx_pwm_init(void)
-{
-	return platform_driver_probe(&ep93xx_pwm_driver, ep93xx_pwm_probe);
-}
-
-static void __exit ep93xx_pwm_exit(void)
-{
-	platform_driver_unregister(&ep93xx_pwm_driver);
-}
-
-module_init(ep93xx_pwm_init);
-module_exit(ep93xx_pwm_exit);
+module_platform_driver(ep93xx_pwm_driver);
 
 MODULE_AUTHOR("Matthieu Crapet <mcrapet@gmail.com>, "
 	      "H Hartley Sweeten <hsweeten@visionengravers.com>");
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] misc: ep93xx_pwm.c: fix section mismatch and use module_platform_driver
  2013-03-16  1:07 [PATCH 3/3] misc: ep93xx_pwm.c: fix section mismatch and use module_platform_driver H Hartley Sweeten
@ 2013-03-16 14:57 ` Arnd Bergmann
  2013-03-17  0:07   ` Ryan Mallon
  2013-03-25 20:17 ` Greg KH
  1 sibling, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2013-03-16 14:57 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: Linux Kernel, Ryan Mallon, gregkh

On Saturday 16 March 2013, H Hartley Sweeten wrote:
> Remove the __init tags from the ep93xx_pwm_probe() and
> ep93xx_pwm_remove() functions to fix the section mismatch
> warnings.
> 
> Use module_platform_driver() to remove the init/exit boilerplate.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <rmallon@gmail.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] misc: ep93xx_pwm.c: fix section mismatch and use module_platform_driver
  2013-03-16 14:57 ` Arnd Bergmann
@ 2013-03-17  0:07   ` Ryan Mallon
  2013-03-25 21:49     ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Ryan Mallon @ 2013-03-17  0:07 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: H Hartley Sweeten, Linux Kernel, gregkh

On 17/03/13 01:57, Arnd Bergmann wrote:

> On Saturday 16 March 2013, H Hartley Sweeten wrote:
>> Remove the __init tags from the ep93xx_pwm_probe() and
>> ep93xx_pwm_remove() functions to fix the section mismatch
>> warnings.
>>
>> Use module_platform_driver() to remove the init/exit boilerplate.
>>
>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Ryan Mallon <rmallon@gmail.com>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de>


For the whole series:

Acked-by: Ryan Mallon <rmallon@gmail.com>

Not sure if I should take these in my tree, or if they should be
handled by the respective subsystem maintainers. Arnd?

~Ryan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] misc: ep93xx_pwm.c: fix section mismatch and use module_platform_driver
  2013-03-16  1:07 [PATCH 3/3] misc: ep93xx_pwm.c: fix section mismatch and use module_platform_driver H Hartley Sweeten
  2013-03-16 14:57 ` Arnd Bergmann
@ 2013-03-25 20:17 ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2013-03-25 20:17 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: Linux Kernel, Ryan Mallon, arnd

On Fri, Mar 15, 2013 at 06:07:13PM -0700, H Hartley Sweeten wrote:
> Remove the __init tags from the ep93xx_pwm_probe() and
> ep93xx_pwm_remove() functions to fix the section mismatch
> warnings.
> 
> Use module_platform_driver() to remove the init/exit boilerplate.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <rmallon@gmail.com>

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] misc: ep93xx_pwm.c: fix section mismatch and use module_platform_driver
  2013-03-17  0:07   ` Ryan Mallon
@ 2013-03-25 21:49     ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2013-03-25 21:49 UTC (permalink / raw)
  To: Ryan Mallon; +Cc: H Hartley Sweeten, Linux Kernel, gregkh

On Sunday 17 March 2013, Ryan Mallon wrote:
> On 17/03/13 01:57, Arnd Bergmann wrote:
> 
> > On Saturday 16 March 2013, H Hartley Sweeten wrote:
> >> Remove the __init tags from the ep93xx_pwm_probe() and
> >> ep93xx_pwm_remove() functions to fix the section mismatch
> >> warnings.
> >>
> >> Use module_platform_driver() to remove the init/exit boilerplate.
> >>
> >> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> >> Cc: Ryan Mallon <rmallon@gmail.com>
> >> Cc: Arnd Bergmann <arnd@arndb.de>
> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > 
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> 
> For the whole series:
> 
> Acked-by: Ryan Mallon <rmallon@gmail.com>
> 
> Not sure if I should take these in my tree, or if they should be
> handled by the respective subsystem maintainers. Arnd?

Doesn't matter much, as there are no dependencies. The default would
be to ask the subsystem maintainers to put them into their trees.
If that doesn't happen for some reason, I can take them through the
arm-soc tree as a fallback.

	Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-25 21:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16  1:07 [PATCH 3/3] misc: ep93xx_pwm.c: fix section mismatch and use module_platform_driver H Hartley Sweeten
2013-03-16 14:57 ` Arnd Bergmann
2013-03-17  0:07   ` Ryan Mallon
2013-03-25 21:49     ` Arnd Bergmann
2013-03-25 20:17 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.