From patchwork Tue May 12 14:15:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uri Shkolnik X-Patchwork-Id: 23249 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4CEFwa3023309 for ; Tue, 12 May 2009 14:15:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751889AbZELOPz (ORCPT ); Tue, 12 May 2009 10:15:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752382AbZELOPz (ORCPT ); Tue, 12 May 2009 10:15:55 -0400 Received: from web110809.mail.gq1.yahoo.com ([67.195.13.232]:46413 "HELO web110809.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751889AbZELOPy (ORCPT ); Tue, 12 May 2009 10:15:54 -0400 Received: (qmail 92353 invoked by uid 60001); 12 May 2009 14:15:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1242137755; bh=aKsRmVIpbUROd3KAZ712OOGQfvQV4DeuCJUhNwezqgk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=uRp2d96HOe3RIQtS4I461fJrpqRdelVetYTmdDm5LVoBNfsCHzH1XE/GYx4Cf8sgBcOHfmFjiqFLSPGLdY7EE3bPnGvRABgAYVY9ZUsVYfjACIAqGXLnUNM5A6ObmyC0aBhuX9vZYwJZirCU1JSp/AxmUDeaZg5lZw7u2LDQAJw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=SAoJeg04W52MuWb5CKVhQnSYbILIRQlvYJfOz0X45fOhv0efmI5CO7QmDS1omIE/reavwvvZjz+IFeQbS9/ll1a9rNA3cqtUryFBTQQjNDbEURE+7NqIMzd/LxdJbxyKRCXTg7Y5YdKFq9JQv3UKQ1IVoAWG9FxVddMGnecHl6w=; Message-ID: <13295.91916.qm@web110809.mail.gq1.yahoo.com> X-YMail-OSG: 1b1NCV4VM1ldSdyCKkBZrBvPZYTnMbh3tNr6UYVqVlZWnKmEuto0w7sw8H3zRopPaGWOjmKwq058OrwF5TwXBkJjPCXjyv.5xtu77ZTDEmBLYFWFxuyVgtt1Zdr9j.fCT87J9kAtCjeVgHlGy_mw2jxe0Up5cGe4xlBxC8OCQMaGfifamJx0fD8lNcXAQ7gscXQmty5NQRWHgMg4RxDtmAgoi9CRf6kL23uvWnj3__18jOaboIxc29ImYIDbcKsJTo6jnpplmuIgCEABuIe.AoL2yytoXoHuXpicfbvDJJM_2.s.f2BugaNlMuWoPypZoO6TJq1hp3X2F26R8vzKhiIt89ZJoMRw8RWCsZrpL4CkQShT.GNp_MR4qQ-- Received: from [199.203.99.233] by web110809.mail.gq1.yahoo.com via HTTP; Tue, 12 May 2009 07:15:54 PDT X-Mailer: YahooMailClassic/5.3.9 YahooMailWebService/0.7.289.10 Date: Tue, 12 May 2009 07:15:54 -0700 (PDT) From: Uri Shkolnik Subject: [PATCH] [0905_01_2] Siano: make single kernel object (module) To: LinuxML MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org # HG changeset patch # User Uri Shkolnik # Date 1242137970 -10800 # Node ID db8bfae234d4730f18823ca0686762a13e7997c9 # Parent 126c0974c2db4e2777e5d9b068fa976fe3a59675 [0905_01_2] Siano: make single kernel object (module) From: Uri Shkolnik This patch consolidates the components to single kernel object (module) Priority: normal Signed-off-by: Uri Shkolnik --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -r 126c0974c2db -r db8bfae234d4 linux/drivers/media/dvb/siano/Makefile --- a/linux/drivers/media/dvb/siano/Makefile Tue May 12 16:47:51 2009 +0300 +++ b/linux/drivers/media/dvb/siano/Makefile Tue May 12 17:19:30 2009 +0300 @@ -1,10 +1,8 @@ sms1xxx-objs := smscoreapi.o sms-cards.o -sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o +sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o smsusb.o smsdvb.o obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsdvb.o -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core -DSMS_DVB3_SUBSYS -DSMS_USB_DRV EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m) diff -r 126c0974c2db -r db8bfae234d4 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.c Tue May 12 16:47:51 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.c Tue May 12 17:19:30 2009 +0300 @@ -1321,8 +1321,8 @@ static int __init smscore_module_init(vo } #endif -#if 0 /* def SMS_DVB_CLIENT */ - /* DVB Register */ +#ifdef SMS_DVB3_SUBSYS + /* DVB v.3 Register */ rc = smsdvb_register(); if (rc) { sms_err("Error registering DVB client.\n"); @@ -1339,12 +1339,12 @@ static int __init smscore_module_init(vo } #endif -#if 0 /* def SMS_USB_BUS_DRV */ +#ifdef SMS_USB_DRV /* USB Register */ rc = smsusb_register(); if (rc) { sms_err("Error registering USB bus driver.\n"); - goto sms_bus_drv_error; + goto sms_usb_drv_error; } #endif @@ -1358,21 +1358,13 @@ static int __init smscore_module_init(vo #endif return rc; -#if 0 -sms_bus_drv_error: -#endif /* 0 */ -#if 0 /* def SMS_NET_CLIENT */ - smsnet_unregister(); -smsnet_error: -#endif -#if 0 /* def SMS_DVB_CLIENT */ +sms_usb_drv_error: +#ifdef SMS_DVB3_SUBSYS smsdvb_unregister(); smsdvb_error: #endif -#if 0 /* def SMS_CHAR_CLIENT */ - smschar_unregister(); -smschar_error: -#endif + + sms_debug("rc %d", rc); return rc; @@ -1380,14 +1372,15 @@ smschar_error: static void __exit smscore_module_exit(void) { -#if 0 /* def SMS_CHAR_CLIENT */ - /* Char interface UnRegister */ - smschar_unregister(); +#ifdef SMS_DVB3_SUBSYS + /* DVB v.3 unregister */ + smsdvb_unregister(); #endif -#if 0 /* def SMS_DVB_CLIENT */ - /* DVB UnRegister */ - smsdvb_unregister(); + /* Unegister interfaces objects */ +#ifdef SMS_USB_DRV + /* USB unregister */ + smsusb_unregister(); #endif #if 0 /* def SMS_NET_CLIENT */ diff -r 126c0974c2db -r db8bfae234d4 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.h Tue May 12 16:47:51 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.h Tue May 12 17:19:30 2009 +0300 @@ -35,7 +35,6 @@ along with this program. If not, see #include "compat.h" -#define SMS_DVB3_SUBSYS #ifdef SMS_DVB3_SUBSYS #include "dmxdev.h" #include "dvbdev.h" @@ -661,6 +660,15 @@ int smscore_get_board_id(struct smscore_ int smscore_led_state(struct smscore_device_t *core, int led); +#ifdef SMS_DVB3_SUBSYS +extern int smsdvb_register(void); +extern void smsdvb_unregister(void); +#endif + +#ifdef SMS_USB_DRV +extern int smsusb_register(void); +extern void smsusb_unregister(void); +#endif /* ------------------------------------------------------------------------ */ diff -r 126c0974c2db -r db8bfae234d4 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.c Tue May 12 16:47:51 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.c Tue May 12 17:19:30 2009 +0300 @@ -518,7 +518,7 @@ adapter_error: return rc; } -int smsdvb_module_init(void) +int smsdvb_register(void) { int rc; @@ -532,7 +532,7 @@ int smsdvb_module_init(void) return rc; } -void smsdvb_module_exit(void) +void smsdvb_unregister(void) { smscore_unregister_hotplug(smsdvb_hotplug); @@ -545,9 +545,6 @@ void smsdvb_module_exit(void) kmutex_unlock(&g_smsdvb_clientslock); } -module_init(smsdvb_module_init); -module_exit(smsdvb_module_exit); - MODULE_DESCRIPTION("SMS DVB subsystem adaptation module"); MODULE_AUTHOR("Siano Mobile Silicon, INC. (uris@siano-ms.com)"); MODULE_LICENSE("GPL"); diff -r 126c0974c2db -r db8bfae234d4 linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.c Tue May 12 16:47:51 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.c Tue May 12 17:19:30 2009 +0300 @@ -74,6 +74,7 @@ static void smsusb_onresponse(struct urb if (urb->actual_length > 0) { struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) surb->cb->p; + smsendian_handle_message_header(phdr); if (urb->actual_length >= phdr->msgLength) { surb->cb->size = phdr->msgLength; @@ -537,7 +538,7 @@ static struct usb_driver smsusb_driver = .resume = smsusb_resume, }; -int smsusb_module_init(void) +int smsusb_register(void) { int rc = usb_register(&smsusb_driver); if (rc) @@ -548,15 +549,12 @@ int smsusb_module_init(void) return rc; } -void smsusb_module_exit(void) +void smsusb_unregister(void) { - sms_debug(""); /* Regular USB Cleanup */ usb_deregister(&smsusb_driver); + sms_info("end"); } - -module_init(smsusb_module_init); -module_exit(smsusb_module_exit); MODULE_DESCRIPTION("Driver for the Siano SMS1XXX USB dongle"); MODULE_AUTHOR("Siano Mobile Silicon, INC. (uris@siano-ms.com)");