Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1445563 > unrolled thread

[PATCH 0/6] radio: Utilize the module_isa_driver macro

Started byWilliam Breathitt Gray <vilhelm.gray@gmail.com>
First post2016-07-18 16:50 +0200
Last post2016-07-20 14:50 +0200
Articles 9 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/6] radio: Utilize the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-07-18 16:50 +0200
    [PATCH 3/6] radio: trust: Utilize the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-07-18 16:50 +0200
    [PATCH 4/6] radio: zoltrix: Utilize the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-07-18 16:50 +0200
    [PATCH 5/6] radio: aztech: Utilize the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-07-18 16:50 +0200
    [PATCH 6/6] radio: aimslab: Utilize the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-07-18 16:50 +0200
    [PATCH 1/6] radio: terratec: Utilize the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-07-18 16:50 +0200
    [PATCH 2/6] radio: rtrack2: Utilize the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-07-18 16:50 +0200
    Re: [PATCH 0/6] radio: Utilize the module_isa_driver macro Hans Verkuil <hverkuil@xs4all.nl> - 2016-07-20 12:40 +0200
      Re: [PATCH 0/6] radio: Utilize the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-07-20 14:50 +0200

#1445563 — [PATCH 0/6] radio: Utilize the module_isa_driver macro

FromWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Date2016-07-18 16:50 +0200
Subject[PATCH 0/6] radio: Utilize the module_isa_driver macro
Message-ID<rWi1P-7tY-1@gated-at.bofh.it>
The module_isa_driver macro is a helper macro for ISA drivers which do
not do anything special in module init/exit. This patchset eliminates a
lot of ISA driver registration boilerplate code by utilizing
module_isa_driver, which replaces module_init and module_exit.

William Breathitt Gray (6):
  radio: terratec: Utilize the module_isa_driver macro
  radio: rtrack2: Utilize the module_isa_driver macro
  radio: trust: Utilize the module_isa_driver macro
  radio: zoltrix: Utilize the module_isa_driver macro
  radio: aztech: Utilize the module_isa_driver macro
  radio: aimslab: Utilize the module_isa_driver macro

 drivers/media/radio/radio-aimslab.c  | 13 +------------
 drivers/media/radio/radio-aztech.c   | 13 +------------
 drivers/media/radio/radio-rtrack2.c  | 13 +------------
 drivers/media/radio/radio-terratec.c | 14 +-------------
 drivers/media/radio/radio-trust.c    | 13 +------------
 drivers/media/radio/radio-zoltrix.c  | 14 +-------------
 6 files changed, 6 insertions(+), 74 deletions(-)

-- 
2.7.3

[toc] | [next] | [standalone]


#1445565 — [PATCH 3/6] radio: trust: Utilize the module_isa_driver macro

FromWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Date2016-07-18 16:50 +0200
Subject[PATCH 3/6] radio: trust: Utilize the module_isa_driver macro
Message-ID<rWi1Q-7tY-7@gated-at.bofh.it>
In reply to#1445563
This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/media/radio/radio-trust.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/media/radio/radio-trust.c b/drivers/media/radio/radio-trust.c
index 26a8c60..e4bec5e 100644
--- a/drivers/media/radio/radio-trust.c
+++ b/drivers/media/radio/radio-trust.c
@@ -229,15 +229,4 @@ static struct radio_isa_driver trust_driver = {
 	.max_volume = 31,
 };
 
-static int __init trust_init(void)
-{
-	return isa_register_driver(&trust_driver.driver, TRUST_MAX);
-}
-
-static void __exit trust_exit(void)
-{
-	isa_unregister_driver(&trust_driver.driver);
-}
-
-module_init(trust_init);
-module_exit(trust_exit);
+module_isa_driver(trust_driver.driver, TRUST_MAX);
-- 
2.7.3

[toc] | [prev] | [next] | [standalone]


#1445566 — [PATCH 4/6] radio: zoltrix: Utilize the module_isa_driver macro

FromWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Date2016-07-18 16:50 +0200
Subject[PATCH 4/6] radio: zoltrix: Utilize the module_isa_driver macro
Message-ID<rWi1Q-7tY-11@gated-at.bofh.it>
In reply to#1445563
This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/media/radio/radio-zoltrix.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/media/radio/radio-zoltrix.c b/drivers/media/radio/radio-zoltrix.c
index 026e88e..597da26 100644
--- a/drivers/media/radio/radio-zoltrix.c
+++ b/drivers/media/radio/radio-zoltrix.c
@@ -233,16 +233,4 @@ static struct radio_isa_driver zoltrix_driver = {
 	.max_volume = 15,
 };
 
-static int __init zoltrix_init(void)
-{
-	return isa_register_driver(&zoltrix_driver.driver, ZOLTRIX_MAX);
-}
-
-static void __exit zoltrix_exit(void)
-{
-	isa_unregister_driver(&zoltrix_driver.driver);
-}
-
-module_init(zoltrix_init);
-module_exit(zoltrix_exit);
-
+module_isa_driver(zoltrix_driver.driver, ZOLTRIX_MAX);
-- 
2.7.3

[toc] | [prev] | [next] | [standalone]


#1445567 — [PATCH 5/6] radio: aztech: Utilize the module_isa_driver macro

FromWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Date2016-07-18 16:50 +0200
Subject[PATCH 5/6] radio: aztech: Utilize the module_isa_driver macro
Message-ID<rWi1Q-7tY-9@gated-at.bofh.it>
In reply to#1445563
This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/media/radio/radio-aztech.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c
index 705dd6f..7b39655 100644
--- a/drivers/media/radio/radio-aztech.c
+++ b/drivers/media/radio/radio-aztech.c
@@ -147,15 +147,4 @@ static struct radio_isa_driver aztech_driver = {
 	.max_volume = 3,
 };
 
-static int __init aztech_init(void)
-{
-	return isa_register_driver(&aztech_driver.driver, AZTECH_MAX);
-}
-
-static void __exit aztech_exit(void)
-{
-	isa_unregister_driver(&aztech_driver.driver);
-}
-
-module_init(aztech_init);
-module_exit(aztech_exit);
+module_isa_driver(aztech_driver.driver, AZTECH_MAX);
-- 
2.7.3

[toc] | [prev] | [next] | [standalone]


#1445568 — [PATCH 6/6] radio: aimslab: Utilize the module_isa_driver macro

FromWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Date2016-07-18 16:50 +0200
Subject[PATCH 6/6] radio: aimslab: Utilize the module_isa_driver macro
Message-ID<rWi1Q-7tY-13@gated-at.bofh.it>
In reply to#1445563
This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/media/radio/radio-aimslab.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c
index ea930879..d1566a3 100644
--- a/drivers/media/radio/radio-aimslab.c
+++ b/drivers/media/radio/radio-aimslab.c
@@ -180,15 +180,4 @@ static struct radio_isa_driver rtrack_driver = {
 	.max_volume = 0xff,
 };
 
-static int __init rtrack_init(void)
-{
-	return isa_register_driver(&rtrack_driver.driver, RTRACK_MAX);
-}
-
-static void __exit rtrack_exit(void)
-{
-	isa_unregister_driver(&rtrack_driver.driver);
-}
-
-module_init(rtrack_init);
-module_exit(rtrack_exit);
+module_isa_driver(rtrack_driver.driver, RTRACK_MAX);
-- 
2.7.3

[toc] | [prev] | [next] | [standalone]


#1445569 — [PATCH 1/6] radio: terratec: Utilize the module_isa_driver macro

FromWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Date2016-07-18 16:50 +0200
Subject[PATCH 1/6] radio: terratec: Utilize the module_isa_driver macro
Message-ID<rWi1Q-7tY-15@gated-at.bofh.it>
In reply to#1445563
This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/media/radio/radio-terratec.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/media/radio/radio-terratec.c b/drivers/media/radio/radio-terratec.c
index be10a80..621bbb2 100644
--- a/drivers/media/radio/radio-terratec.c
+++ b/drivers/media/radio/radio-terratec.c
@@ -155,16 +155,4 @@ static struct radio_isa_driver terratec_driver = {
 	.max_volume = 10,
 };
 
-static int __init terratec_init(void)
-{
-	return isa_register_driver(&terratec_driver.driver, 1);
-}
-
-static void __exit terratec_exit(void)
-{
-	isa_unregister_driver(&terratec_driver.driver);
-}
-
-module_init(terratec_init);
-module_exit(terratec_exit);
-
+module_isa_driver(terratec_driver.driver, 1);
-- 
2.7.3

[toc] | [prev] | [next] | [standalone]


#1445572 — [PATCH 2/6] radio: rtrack2: Utilize the module_isa_driver macro

FromWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Date2016-07-18 16:50 +0200
Subject[PATCH 2/6] radio: rtrack2: Utilize the module_isa_driver macro
Message-ID<rWi1Q-7tY-25@gated-at.bofh.it>
In reply to#1445563
This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/media/radio/radio-rtrack2.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/media/radio/radio-rtrack2.c b/drivers/media/radio/radio-rtrack2.c
index 09cfbc3..82b8794 100644
--- a/drivers/media/radio/radio-rtrack2.c
+++ b/drivers/media/radio/radio-rtrack2.c
@@ -127,15 +127,4 @@ static struct radio_isa_driver rtrack2_driver = {
 	.has_stereo = true,
 };
 
-static int __init rtrack2_init(void)
-{
-	return isa_register_driver(&rtrack2_driver.driver, RTRACK2_MAX);
-}
-
-static void __exit rtrack2_exit(void)
-{
-	isa_unregister_driver(&rtrack2_driver.driver);
-}
-
-module_init(rtrack2_init);
-module_exit(rtrack2_exit);
+module_isa_driver(rtrack2_driver.driver, RTRACK2_MAX);
-- 
2.7.3

[toc] | [prev] | [next] | [standalone]


#1447149

FromHans Verkuil <hverkuil@xs4all.nl>
Date2016-07-20 12:40 +0200
Message-ID<rWX4Z-b1-7@gated-at.bofh.it>
In reply to#1445563
On 07/18/2016 04:45 PM, William Breathitt Gray wrote:
> The module_isa_driver macro is a helper macro for ISA drivers which do
> not do anything special in module init/exit. This patchset eliminates a
> lot of ISA driver registration boilerplate code by utilizing
> module_isa_driver, which replaces module_init and module_exit.
> 
> William Breathitt Gray (6):
>   radio: terratec: Utilize the module_isa_driver macro
>   radio: rtrack2: Utilize the module_isa_driver macro
>   radio: trust: Utilize the module_isa_driver macro
>   radio: zoltrix: Utilize the module_isa_driver macro
>   radio: aztech: Utilize the module_isa_driver macro
>   radio: aimslab: Utilize the module_isa_driver macro

Good idea, but it doesn't compile:

module_isa_driver(terratec_driver.driver, 1);

expands to:

static int __init terratec_driver.driver_init(void)
{
        return isa_register_driver(&(terratec_driver.driver), 1);
}

So now the function name contains a '.' and it won't compile.

Regards,

	Hans

[toc] | [prev] | [next] | [standalone]


#1447210

FromWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Date2016-07-20 14:50 +0200
Message-ID<rWZ6O-1u8-15@gated-at.bofh.it>
In reply to#1447149
On Wed, Jul 20, 2016 at 12:37:31PM +0200, Hans Verkuil wrote:
>On 07/18/2016 04:45 PM, William Breathitt Gray wrote:
>> The module_isa_driver macro is a helper macro for ISA drivers which do
>> not do anything special in module init/exit. This patchset eliminates a
>> lot of ISA driver registration boilerplate code by utilizing
>> module_isa_driver, which replaces module_init and module_exit.
>> 
>> William Breathitt Gray (6):
>>   radio: terratec: Utilize the module_isa_driver macro
>>   radio: rtrack2: Utilize the module_isa_driver macro
>>   radio: trust: Utilize the module_isa_driver macro
>>   radio: zoltrix: Utilize the module_isa_driver macro
>>   radio: aztech: Utilize the module_isa_driver macro
>>   radio: aimslab: Utilize the module_isa_driver macro
>
>Good idea, but it doesn't compile:
>
>module_isa_driver(terratec_driver.driver, 1);
>
>expands to:
>
>static int __init terratec_driver.driver_init(void)
>{
>        return isa_register_driver(&(terratec_driver.driver), 1);
>}
>
>So now the function name contains a '.' and it won't compile.
>
>Regards,
>
>	Hans

Oops, looks like I was a bit on autopilot there. I'll have to rethink
this patchset at a later point to overcome the symbol naming issue.

Thank you,

William Breathitt Gray

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web