Skip to content

Commit

Permalink
V4L/DVB (10752): sms1xxx: load smsdvb module automatically based on d…
Browse files Browse the repository at this point in the history
…evice 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>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent b9391f4 commit 05860f2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions drivers/media/dvb/siano/sms-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,20 @@ int sms_board_lna_control(struct smscore_device_t *coredev, int onoff)
return -EINVAL;
}
EXPORT_SYMBOL(sms_board_lna_control);

int sms_board_load_modules(int id)
{
switch (id) {
case SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT:
case SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A:
case SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B:
case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM:
request_module("smsdvb");
break;
default:
/* do nothing */
break;
}
return 0;
}
EXPORT_SYMBOL(sms_board_load_modules);
2 changes: 2 additions & 0 deletions drivers/media/dvb/siano/sms-cards.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@ int sms_board_led_feedback(struct smscore_device_t *coredev, int led);
int sms_board_power(struct smscore_device_t *coredev, int onoff);
int sms_board_lna_control(struct smscore_device_t *coredev, int onoff);

extern int sms_board_load_modules(int id);

#endif /* __SMS_CARDS_H__ */
1 change: 1 addition & 0 deletions drivers/media/dvb/siano/smsusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ static int smsusb_probe(struct usb_interface *intf,

rc = smsusb_init_device(intf, id->driver_info);
sms_info("rc %d", rc);
sms_board_load_modules(id->driver_info);
return rc;
}

Expand Down

0 comments on commit 05860f2

Please sign in to comment.