* [PATCH 0/6] radio: Utilize the module_isa_driver macro
@ 2016-07-18 14:45 William Breathitt Gray
2016-07-18 14:45 ` [PATCH 1/6] radio: terratec: " William Breathitt Gray
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: William Breathitt Gray @ 2016-07-18 14:45 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, William Breathitt Gray
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/6] radio: terratec: Utilize the module_isa_driver macro
2016-07-18 14:45 [PATCH 0/6] radio: Utilize the module_isa_driver macro William Breathitt Gray
@ 2016-07-18 14:45 ` William Breathitt Gray
2016-07-18 14:46 ` [PATCH 2/6] radio: rtrack2: " William Breathitt Gray
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: William Breathitt Gray @ 2016-07-18 14:45 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, William Breathitt Gray
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/6] radio: rtrack2: Utilize the module_isa_driver macro
2016-07-18 14:45 [PATCH 0/6] radio: Utilize the module_isa_driver macro William Breathitt Gray
2016-07-18 14:45 ` [PATCH 1/6] radio: terratec: " William Breathitt Gray
@ 2016-07-18 14:46 ` William Breathitt Gray
2016-07-18 14:46 ` [PATCH 3/6] radio: trust: " William Breathitt Gray
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: William Breathitt Gray @ 2016-07-18 14:46 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, William Breathitt Gray
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/6] radio: trust: Utilize the module_isa_driver macro
2016-07-18 14:45 [PATCH 0/6] radio: Utilize the module_isa_driver macro William Breathitt Gray
2016-07-18 14:45 ` [PATCH 1/6] radio: terratec: " William Breathitt Gray
2016-07-18 14:46 ` [PATCH 2/6] radio: rtrack2: " William Breathitt Gray
@ 2016-07-18 14:46 ` William Breathitt Gray
2016-07-18 14:46 ` [PATCH 4/6] radio: zoltrix: " William Breathitt Gray
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: William Breathitt Gray @ 2016-07-18 14:46 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, William Breathitt Gray
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/6] radio: zoltrix: Utilize the module_isa_driver macro
2016-07-18 14:45 [PATCH 0/6] radio: Utilize the module_isa_driver macro William Breathitt Gray
` (2 preceding siblings ...)
2016-07-18 14:46 ` [PATCH 3/6] radio: trust: " William Breathitt Gray
@ 2016-07-18 14:46 ` William Breathitt Gray
2016-07-18 14:46 ` [PATCH 5/6] radio: aztech: " William Breathitt Gray
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: William Breathitt Gray @ 2016-07-18 14:46 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, William Breathitt Gray
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/6] radio: aztech: Utilize the module_isa_driver macro
2016-07-18 14:45 [PATCH 0/6] radio: Utilize the module_isa_driver macro William Breathitt Gray
` (3 preceding siblings ...)
2016-07-18 14:46 ` [PATCH 4/6] radio: zoltrix: " William Breathitt Gray
@ 2016-07-18 14:46 ` William Breathitt Gray
2016-07-18 14:47 ` [PATCH 6/6] radio: aimslab: " William Breathitt Gray
2016-07-20 10:37 ` [PATCH 0/6] radio: " Hans Verkuil
6 siblings, 0 replies; 9+ messages in thread
From: William Breathitt Gray @ 2016-07-18 14:46 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, William Breathitt Gray, Hans Verkuil
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/6] radio: aimslab: Utilize the module_isa_driver macro
2016-07-18 14:45 [PATCH 0/6] radio: Utilize the module_isa_driver macro William Breathitt Gray
` (4 preceding siblings ...)
2016-07-18 14:46 ` [PATCH 5/6] radio: aztech: " William Breathitt Gray
@ 2016-07-18 14:47 ` William Breathitt Gray
2016-07-20 10:37 ` [PATCH 0/6] radio: " Hans Verkuil
6 siblings, 0 replies; 9+ messages in thread
From: William Breathitt Gray @ 2016-07-18 14:47 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, William Breathitt Gray, Hans Verkuil
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/6] radio: Utilize the module_isa_driver macro
2016-07-18 14:45 [PATCH 0/6] radio: Utilize the module_isa_driver macro William Breathitt Gray
` (5 preceding siblings ...)
2016-07-18 14:47 ` [PATCH 6/6] radio: aimslab: " William Breathitt Gray
@ 2016-07-20 10:37 ` Hans Verkuil
2016-07-20 12:45 ` William Breathitt Gray
6 siblings, 1 reply; 9+ messages in thread
From: Hans Verkuil @ 2016-07-20 10:37 UTC (permalink / raw)
To: William Breathitt Gray, mchehab; +Cc: linux-media, linux-kernel
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/6] radio: Utilize the module_isa_driver macro
2016-07-20 10:37 ` [PATCH 0/6] radio: " Hans Verkuil
@ 2016-07-20 12:45 ` William Breathitt Gray
0 siblings, 0 replies; 9+ messages in thread
From: William Breathitt Gray @ 2016-07-20 12:45 UTC (permalink / raw)
To: Hans Verkuil; +Cc: mchehab, linux-media, linux-kernel
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-07-20 12:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18 14:45 [PATCH 0/6] radio: Utilize the module_isa_driver macro William Breathitt Gray
2016-07-18 14:45 ` [PATCH 1/6] radio: terratec: " William Breathitt Gray
2016-07-18 14:46 ` [PATCH 2/6] radio: rtrack2: " William Breathitt Gray
2016-07-18 14:46 ` [PATCH 3/6] radio: trust: " William Breathitt Gray
2016-07-18 14:46 ` [PATCH 4/6] radio: zoltrix: " William Breathitt Gray
2016-07-18 14:46 ` [PATCH 5/6] radio: aztech: " William Breathitt Gray
2016-07-18 14:47 ` [PATCH 6/6] radio: aimslab: " William Breathitt Gray
2016-07-20 10:37 ` [PATCH 0/6] radio: " Hans Verkuil
2016-07-20 12:45 ` William Breathitt Gray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).