Skip to contentSkip to conversation

sound: sh: Fix up namespace collision in sh_dac_audio.

PATCH Applied Paul Mundt 2 participants 2 messages May 21, 2012 Sound

lore
Share & tools
lore

Paul Mundt

author
#0 lore raw

PATCH 1/1 sound: sh: Fix up namespace collision in sh_dac_audio.

The module_platform_driver() conversion ended up tripping over the driver name, leading to confusion in the macro with regards to 'driver' being redefined. rename it to something slightly more suitable to avoid namespace collisions.

sound/sh/sh_dac_audio.c:444:122: error: conflicting types for 'driver_init' include/linux/device.h:773:6: note: previous declaration of 'driver_init' was here make[3]: *** [sound/sh/sh_dac_audio.o] Error 1

---

 sound/sh/sh_dac_audio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/sh/sh_dac_audio.c +2 -2
index b11f82b..f8b01c7 100644
@@ -433,7 +433,7 @@ probe_error:
 /*
  * "driver" definition
  */
-static struct platform_driver driver = {
+static struct platform_driver sh_dac_driver = {
 	.probe	= snd_sh_dac_probe,
 	.remove = snd_sh_dac_remove,
 	.driver = {
@@ -441,4 +441,4 @@ static struct platform_driver driver = {
 	},
 };
 
-module_platform_driver(driver);
+module_platform_driver(sh_dac_driver);
Applied
#1 lore raw

At Mon, 21 May 2012 18:21:54 +0900,

Quoted 11 lines · Paul Mundt

The module_platform_driver() conversion ended up tripping over the driver name, leading to confusion in the macro with regards to 'driver' being redefined. rename it to something slightly more suitable to avoid namespace collisions.

sound/sh/sh_dac_audio.c:444:122: error: conflicting types for 'driver_init' include/linux/device.h:773:6: note: previous declaration of 'driver_init' was here make[3]: *** [sound/sh/sh_dac_audio.o] Error 1

Thanks, applied now.

Takashi

Quoted 26 lines

---

 sound/sh/sh_dac_audio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/sh/sh_dac_audio.c +2 -2
index b11f82b..f8b01c7 100644
@@ -433,7 +433,7 @@ probe_error:
 /*
  * "driver" definition
  */
-static struct platform_driver driver = {
+static struct platform_driver sh_dac_driver = {
 	.probe	= snd_sh_dac_probe,
 	.remove = snd_sh_dac_remove,
 	.driver = {
@@ -441,4 +441,4 @@ static struct platform_driver driver = {
 	},
 };
 
-module_platform_driver(driver);
+module_platform_driver(sh_dac_driver);