diff options
author | Antti Palosaari <crope@iki.fi> | 2012-05-23 17:44:15 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-04 14:56:19 +0400 |
commit | dc78693706b3efc7e1f7647a35d29736e6d2be3f (patch) | |
tree | 50eac0f708a76d20b50d8f4b932fdedc7ec1cb1a | |
parent | c79b339f92921fe73ac32ac2ae49a5b549dfc1f2 (diff) | |
download | linux-dc78693706b3efc7e1f7647a35d29736e6d2be3f.tar.xz |
[media] dvb_usb_v2: add .init() callback
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb_usb.h | 3 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb_usb_init.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb_usb.h b/drivers/media/dvb/dvb-usb/dvb_usb.h index 95caac116e8e..15b08b777e6d 100644 --- a/drivers/media/dvb/dvb-usb/dvb_usb.h +++ b/drivers/media/dvb/dvb-usb/dvb_usb.h @@ -239,6 +239,8 @@ enum dvb_usb_mode { * @read_mac_address: called to read the MAC address of the device. * @identify_state: called to determine the state (cold or warm), when it * is not distinguishable by the USB IDs. + * @init: called after adapters are created in order to finalize device + * configuration. * * @rc: remote controller properties * @@ -283,6 +285,7 @@ struct dvb_usb_device_properties { int (*read_mac_address) (struct dvb_usb_device *, u8 []); int (*identify_state) (struct usb_device *, struct dvb_usb_device_properties *, struct dvb_usb_device_description **, int *); + int (*init) (struct dvb_usb_device *); struct { enum dvb_usb_mode mode; /* Drivers shouldn't touch on it */ diff --git a/drivers/media/dvb/dvb-usb/dvb_usb_init.c b/drivers/media/dvb/dvb-usb/dvb_usb_init.c index 4ae30451eb9e..0d769a1c1807 100644 --- a/drivers/media/dvb/dvb-usb/dvb_usb_init.c +++ b/drivers/media/dvb/dvb-usb/dvb_usb_init.c @@ -164,6 +164,9 @@ static int dvb_usb_init(struct dvb_usb_device *d, short *adapter_nums) return ret; } + if (d->props.init) + d->props.init(d); + if ((ret = dvb_usb_remote_init(d))) err("could not initialize remote control."); |