From 654e62dc208aedbdc72c4e59cd5f83347e85419e Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Wed, 23 May 2012 15:03:56 -0300 Subject: [PATCH] [media] dvb_usb_v2: remove owner parameter from dvb_usbv2_device_init() Pass that parameter via configuration structure. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/dvb-usb/dvb_usb.h | 6 ++---- drivers/media/dvb/dvb-usb/dvb_usb_dvb.c | 3 ++- drivers/media/dvb/dvb-usb/dvb_usb_init.c | 2 -- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/media/dvb/dvb-usb/dvb_usb.h b/drivers/media/dvb/dvb-usb/dvb_usb.h index 7f1f10989de4..db9a7ddd039d 100644 --- a/drivers/media/dvb/dvb-usb/dvb_usb.h +++ b/drivers/media/dvb/dvb-usb/dvb_usb.h @@ -224,6 +224,7 @@ enum dvb_usb_mode { /** * struct dvb_usb_device_properties - properties of a dvb-usb-device + * @owner: owner of the dvb_adapter * @usb_ctrl: which USB device-side controller is in use. Needed for firmware * download. * @firmware: name of the firmware file. @@ -263,6 +264,7 @@ enum dvb_usb_mode { */ #define MAX_NO_OF_ADAPTER_PER_DEVICE 2 struct dvb_usb_device_properties { + struct module *owner; #define DVB_USB_IS_AN_I2C_ADAPTER 0x01 int caps; @@ -419,7 +421,6 @@ struct dvb_usb_adapter { * @rc_query_work: struct work_struct frequent rc queries * @last_event: last triggered event * @last_state: last state (no, pressed, repeat) - * @owner: owner of the dvb_adapter * @priv: private data of the actual driver (allocate by dvb-usb, size defined * in size_of_priv of dvb_usb_properties). */ @@ -455,14 +456,11 @@ struct dvb_usb_device { u32 last_event; int last_state; - struct module *owner; - void *priv; }; extern int dvb_usbv2_device_init(struct usb_interface *, const struct usb_device_id *, - struct module *, short *adapter_nums); extern void dvb_usbv2_device_exit(struct usb_interface *); diff --git a/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c b/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c index 59cc26cb24c5..0795c2436cc8 100644 --- a/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c +++ b/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c @@ -98,7 +98,8 @@ int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) { int i; int ret = dvb_register_adapter(&adap->dvb_adap, adap->dev->desc->name, - adap->dev->owner, &adap->dev->udev->dev, + adap->dev->props.owner, + &adap->dev->udev->dev, adapter_nums); if (ret < 0) { diff --git a/drivers/media/dvb/dvb-usb/dvb_usb_init.c b/drivers/media/dvb/dvb-usb/dvb_usb_init.c index 93b45546181a..7334ce6d0379 100644 --- a/drivers/media/dvb/dvb-usb/dvb_usb_init.c +++ b/drivers/media/dvb/dvb-usb/dvb_usb_init.c @@ -235,7 +235,6 @@ int dvb_usb_device_power_ctrl(struct dvb_usb_device *d, int onoff) */ int dvb_usbv2_device_init(struct usb_interface *intf, const struct usb_device_id *id, - struct module *owner, short *adapter_nums) { struct usb_device *udev = interface_to_usbdev(intf); @@ -268,7 +267,6 @@ int dvb_usbv2_device_init(struct usb_interface *intf, d->udev = udev; memcpy(&d->props, props, sizeof(struct dvb_usb_device_properties)); d->desc = desc; - d->owner = owner; usb_set_intfdata(intf, d); -- 2.20.1