diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-08-31 16:39:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:01 -0400 |
commit | 05860f2d966c7d43aebde26eec7f9b8dee6d1523 (patch) | |
tree | da609055db591139747a3de26852918d61154d20 /drivers | |
parent | b9391f4160a62f8c44bee6b93dab33cf329857c7 (diff) |
V4L/DVB (10752): sms1xxx: load smsdvb module automatically based on device id
The smsdvb module was separated from the core and usb code. This change loads
smsdvb automatically for driver configurations that depend on it.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/siano/sms-cards.c | 17 | ||||
-rw-r--r-- | drivers/media/dvb/siano/sms-cards.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/siano/smsusb.c | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c index 4fa86f5b7fc5..44df81a81506 100644 --- a/drivers/media/dvb/siano/sms-cards.c +++ b/drivers/media/dvb/siano/sms-cards.c | |||
@@ -204,3 +204,20 @@ int sms_board_lna_control(struct smscore_device_t *coredev, int onoff) | |||
204 | return -EINVAL; | 204 | return -EINVAL; |
205 | } | 205 | } |
206 | EXPORT_SYMBOL(sms_board_lna_control); | 206 | EXPORT_SYMBOL(sms_board_lna_control); |
207 | |||
208 | int sms_board_load_modules(int id) | ||
209 | { | ||
210 | switch (id) { | ||
211 | case SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT: | ||
212 | case SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A: | ||
213 | case SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B: | ||
214 | case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: | ||
215 | request_module("smsdvb"); | ||
216 | break; | ||
217 | default: | ||
218 | /* do nothing */ | ||
219 | break; | ||
220 | } | ||
221 | return 0; | ||
222 | } | ||
223 | EXPORT_SYMBOL(sms_board_load_modules); | ||
diff --git a/drivers/media/dvb/siano/sms-cards.h b/drivers/media/dvb/siano/sms-cards.h index 8f539a2e5b9a..64d74c59c33f 100644 --- a/drivers/media/dvb/siano/sms-cards.h +++ b/drivers/media/dvb/siano/sms-cards.h | |||
@@ -54,4 +54,6 @@ int sms_board_led_feedback(struct smscore_device_t *coredev, int led); | |||
54 | int sms_board_power(struct smscore_device_t *coredev, int onoff); | 54 | int sms_board_power(struct smscore_device_t *coredev, int onoff); |
55 | int sms_board_lna_control(struct smscore_device_t *coredev, int onoff); | 55 | int sms_board_lna_control(struct smscore_device_t *coredev, int onoff); |
56 | 56 | ||
57 | extern int sms_board_load_modules(int id); | ||
58 | |||
57 | #endif /* __SMS_CARDS_H__ */ | 59 | #endif /* __SMS_CARDS_H__ */ |
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index 5866b6028dec..5bb8261721b1 100644 --- a/drivers/media/dvb/siano/smsusb.c +++ b/drivers/media/dvb/siano/smsusb.c | |||
@@ -424,6 +424,7 @@ static int smsusb_probe(struct usb_interface *intf, | |||
424 | 424 | ||
425 | rc = smsusb_init_device(intf, id->driver_info); | 425 | rc = smsusb_init_device(intf, id->driver_info); |
426 | sms_info("rc %d", rc); | 426 | sms_info("rc %d", rc); |
427 | sms_board_load_modules(id->driver_info); | ||
427 | return rc; | 428 | return rc; |
428 | } | 429 | } |
429 | 430 | ||