Commit 3ffe2e2c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB media drivers: remove direct calls to dev_set* and dev_get*

change dev_set_drvdata() and dev_get_drvdata() to
usb_set_intfdata() and usb_get_intfdata()
parent 54dc9a82
......@@ -761,7 +761,7 @@ static int dabusb_probe (struct usb_interface *intf,
dbg("bound to interface: %d", ifnum);
up (&s->mutex);
MOD_INC_USE_COUNT;
dev_set_drvdata (&intf->dev, s);
usb_set_intfdata (intf, s);
return 0;
reject:
......@@ -772,11 +772,11 @@ static int dabusb_probe (struct usb_interface *intf,
static void dabusb_disconnect (struct usb_interface *intf)
{
pdabusb_t s = dev_get_drvdata (&intf->dev);
pdabusb_t s = usb_get_intfdata (intf);
dbg("dabusb_disconnect");
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata (intf, NULL);
if (s) {
usb_deregister_dev (1, s->devnum);
s->remove_pending = 1;
......
......@@ -190,15 +190,15 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
usb_dsbr100_radio.priv = radio;
radio->dev = interface_to_usbdev (intf);
radio->curfreq = 1454000;
dev_set_drvdata (&intf->dev, radio);
usb_set_intfdata (intf, radio);
return 0;
}
static void usb_dsbr100_disconnect(struct usb_interface *intf)
{
usb_dsbr100 *radio = dev_get_drvdata (&intf->dev);
usb_dsbr100 *radio = usb_get_intfdata (intf);
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata (intf, NULL);
if (radio) {
lock_kernel();
......
......@@ -3898,7 +3898,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
}
}
MOD_DEC_USE_COUNT;
dev_set_drvdata (&intf->dev, uvd);
usb_set_intfdata (intf, uvd);
return 0;
}
......
......@@ -860,7 +860,7 @@ static int konicawc_probe(struct usb_interface *intf, const struct usb_device_id
MOD_DEC_USE_COUNT;
if (uvd) {
dev_set_drvdata (&intf->dev, uvd);
usb_set_intfdata (intf, uvd);
return 0;
}
return -EIO;
......
......@@ -6247,7 +6247,7 @@ ov51x_probe(struct usb_interface *intf,
create_proc_ov511_cam(ov);
dev_set_drvdata (&intf->dev, ov);
usb_set_intfdata (intf, ov);
return 0;
error:
......@@ -6274,12 +6274,12 @@ ov51x_probe(struct usb_interface *intf,
static void
ov51x_disconnect(struct usb_interface *intf)
{
struct usb_ov511 *ov = dev_get_drvdata (&intf->dev);
struct usb_ov511 *ov = usb_get_intfdata (intf);
int n;
PDEBUG(3, "");
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata (intf, NULL);
if (!ov)
return;
......
......@@ -1840,7 +1840,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
device_hint[hint].pdev = pdev;
Trace(TRACE_PROBE, "probe() function returning struct at 0x%p.\n", pdev);
dev_set_drvdata (&intf->dev, pdev);
usb_set_intfdata (intf, pdev);
return 0;
}
......@@ -1854,8 +1854,8 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
lock_kernel();
free_mem_leak();
pdev = dev_get_drvdata (&intf->dev);
dev_set_drvdata (&intf->dev, NULL);
pdev = usb_get_intfdata (intf);
usb_set_intfdata (intf, NULL);
if (pdev == NULL) {
Err("pwc_disconnect() Called without private pointer.\n");
goto disconnect_out;
......
......@@ -1521,15 +1521,15 @@ static int se401_probe(struct usb_interface *intf,
#endif
info("registered new video device: video%d", se401->vdev.minor);
dev_set_drvdata (&intf->dev, se401);
usb_set_intfdata (intf, se401);
return 0;
}
static void se401_disconnect(struct usb_interface *intf)
{
struct usb_se401 *se401 = dev_get_drvdata (&intf->dev);
struct usb_se401 *se401 = usb_get_intfdata (intf);
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata (intf, NULL);
if (se401) {
video_unregister_device(&se401->vdev);
if (!se401->user){
......
......@@ -1498,7 +1498,7 @@ static int stv680_probe (struct usb_interface *intf, const struct usb_device_id
#endif
PDEBUG (0, "STV(i): registered new video device: video%d", stv680->vdev.minor);
dev_set_drvdata (&intf->dev, stv680);
usb_set_intfdata (intf, stv680);
return 0;
}
......@@ -1535,9 +1535,9 @@ static inline void usb_stv680_remove_disconnected (struct usb_stv *stv680)
static void stv680_disconnect (struct usb_interface *intf)
{
struct usb_stv *stv680 = dev_get_drvdata (&intf->dev);
struct usb_stv *stv680 = usb_get_intfdata (intf);
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata (intf, NULL);
if (stv680) {
/* We don't want people trying to open up the device */
......
......@@ -635,7 +635,7 @@ static int ultracam_probe(struct usb_interface *intf, const struct usb_device_id
MOD_DEC_USE_COUNT;
if (uvd) {
dev_set_drvdata (&intf->dev, uvd);
usb_set_intfdata (intf, uvd);
return 0;
}
return -EIO;
......
......@@ -968,7 +968,7 @@ EXPORT_SYMBOL(usbvideo_Deregister);
*/
static void usbvideo_Disconnect(struct usb_interface *intf)
{
struct uvd *uvd = dev_get_drvdata (&intf->dev);
struct uvd *uvd = usb_get_intfdata (intf);
int i;
if (uvd == NULL) {
......@@ -976,7 +976,7 @@ static void usbvideo_Disconnect(struct usb_interface *intf)
return;
}
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata (intf, NULL);
usbvideo_ClientIncModCount(uvd);
if (uvd->debug > 0)
......
......@@ -1307,7 +1307,7 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id)
printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",cam->vdev.minor);
dev_set_drvdata(&intf->dev, cam);
usb_set_intfdata (intf, cam);
return 0;
}
......@@ -1316,8 +1316,8 @@ static void
vicam_disconnect(struct usb_interface *intf)
{
int open_count;
struct vicam_camera *cam = dev_get_drvdata(&intf->dev);
dev_set_drvdata ( &intf->dev, NULL );
struct vicam_camera *cam = usb_get_intfdata (intf);
usb_set_intfdata (intf, NULL);
/* we must unregister the device before taking its
* cam_lock. This is because the video open call
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment