tea575x: convert to library
PATCH 1/1 tea575x: convert to library
The module is used only as a library for now. Remove module init and exit routines to show this.
While here, remove FSF snail address and attach EXPORT_SYMBOL() macros to corresponding functions.
--- drivers/media/radio/tea575x.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-)
drivers/media/radio/tea575x.c +2 -19
@@ -14,10 +14,6 @@* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* */ #include <linux/delay.h>
@@ -226,6 +222,7 @@ void snd_tea575x_set_freq(struct snd_tea575x *tea)snd_tea575x_write (tea, tea->val); tea->freq =snd_tea575x_val_to_freq (tea, tea->val); } +EXPORT_SYMBOL (snd_tea575x_set_freq);/* * Linux Video interface
@@ -582,25 +579,11 @@ int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)return 0 ; } +EXPORT_SYMBOL (snd_tea575x_init);void snd_tea575x_exit (struct snd_tea575x *tea) {video_unregister_device (&tea->vd);v4l2_ctrl_handler_free (tea->vd.ctrl_handler); } - -static int __init alsa_tea575x_module_init (void ) -{ -return 0 ; -} - -static void __exit alsa_tea575x_module_exit(void) -{ -} - -module_init(alsa_tea575x_module_init) -module_exit(alsa_tea575x_module_exit) - -EXPORT_SYMBOL(snd_tea575x_init);EXPORT_SYMBOL (snd_tea575x_exit); -EXPORT_SYMBOL(snd_tea575x_set_freq);
Signature · 1 line
2.6.4
Quoted 7 lines · Andy Shevchenko
The module is used only as a library for now. Remove module init and exit
routines to show this.While here, remove FSF snail address and attach
EXPORT_SYMBOL()macros to
corresponding functions.
Any comment on this?
The patch has been compiled and tested with SF64-PCR radio tuner (fm801 based).
Quoted 61 lines
Signed-off-by Andy Shevchenko <[email protected]>---
drivers/media/radio/tea575x.c | 21 ++-------------------1 file changed, 2 insertions(+), 19 deletions(-)drivers/media/radio/tea575x.c +0
-1@@ -14,10 +14,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General PublicLicense
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
*/
#include <linux/delay.h>drivers/media/radio/tea575x.c +1
-0@@ -226,6 +222,7 @@ void snd_tea575x_set_freq(struct snd_tea575x *tea) snd_tea575x_write(tea, tea->val); tea->freq = snd_tea575x_val_to_freq(tea, tea->val); } +EXPORT_SYMBOL (snd_tea575x_set_freq);
/*
* Linux Video interfacedrivers/media/radio/tea575x.c +0
-0@@ -582,25 +579,11 @@ int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
return 0;
}
+EXPORT_SYMBOL(snd_tea575x_init);
voidsnd_tea575x_exit(struct snd_tea575x *tea){
video_unregister_device(&tea->vd);v4l2_ctrl_handler_free(tea->vd.ctrl_handler); }drivers/media/radio/tea575x.c +0
-14- -static int __init alsa_tea575x_module_init (void ) -{ -return 0 ; -} - -static void __exit alsa_tea575x_module_exit(void) -{ -} - -module_init(alsa_tea575x_module_init) -module_exit(alsa_tea575x_module_exit) - -EXPORT_SYMBOL(snd_tea575x_init);EXPORT_SYMBOL(snd_tea575x_exit);
-EXPORT_SYMBOL(snd_tea575x_set_freq);
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 10 lines · Andy Shevchenko
Quoted 7 lines · Andy Shevchenko
The module is used only as a library for now. Remove module init and exit
routines to show this.While here, remove FSF snail address and attach
EXPORT_SYMBOL()macros to
corresponding functions.Any comment on this?
Not yet. It's in my todo pile so I will get to it. It's low prio, so this might take some time.
Regards,
Hans
Quoted 66 lines
The patch has been compiled and tested with SF64-PCR radio tuner (fm801 based).
Quoted 61 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/media/radio/tea575x.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-)drivers/media/radio/tea575x.c +0
-1@@ -14,10 +14,6 @@* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
- *
*/#include <linux/delay.h>drivers/media/radio/tea575x.c +1
-0@@ -226,6 +222,7 @@ void snd_tea575x_set_freq(struct snd_tea575x *tea)snd_tea575x_write (tea, tea->val); tea->freq =snd_tea575x_val_to_freq (tea, tea->val); } +EXPORT_SYMBOL (snd_tea575x_set_freq);/* * Linux Video interface
drivers/media/radio/tea575x.c +1
-15@@ -582,25 +579,11 @@ int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)return 0 ; } +EXPORT_SYMBOL (snd_tea575x_init);void snd_tea575x_exit (struct snd_tea575x *tea) {video_unregister_device (&tea->vd);v4l2_ctrl_handler_free (tea->vd.ctrl_handler); } - -static int __init alsa_tea575x_module_init (void ) -{ -return 0 ; -} - -static void __exit alsa_tea575x_module_exit(void) -{ -} - -module_init(alsa_tea575x_module_init) -module_exit(alsa_tea575x_module_exit) - -EXPORT_SYMBOL(snd_tea575x_init);EXPORT_SYMBOL (snd_tea575x_exit); -EXPORT_SYMBOL(snd_tea575x_set_freq);