ChangeSet 1.961, 2002/12/27 15:02:39-08:00, greg@kroah.com [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() diff -Nru a/drivers/usb/media/dabusb.c b/drivers/usb/media/dabusb.c --- a/drivers/usb/media/dabusb.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/dabusb.c Fri Dec 27 23:56:13 2002 @@ -761,7 +761,7 @@ 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 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; diff -Nru a/drivers/usb/media/dsbr100.c b/drivers/usb/media/dsbr100.c --- a/drivers/usb/media/dsbr100.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/dsbr100.c Fri Dec 27 23:56:13 2002 @@ -190,15 +190,15 @@ 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(); diff -Nru a/drivers/usb/media/ibmcam.c b/drivers/usb/media/ibmcam.c --- a/drivers/usb/media/ibmcam.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/ibmcam.c Fri Dec 27 23:56:13 2002 @@ -3898,7 +3898,7 @@ } } MOD_DEC_USE_COUNT; - dev_set_drvdata (&intf->dev, uvd); + usb_set_intfdata (intf, uvd); return 0; } diff -Nru a/drivers/usb/media/konicawc.c b/drivers/usb/media/konicawc.c --- a/drivers/usb/media/konicawc.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/konicawc.c Fri Dec 27 23:56:13 2002 @@ -860,7 +860,7 @@ MOD_DEC_USE_COUNT; if (uvd) { - dev_set_drvdata (&intf->dev, uvd); + usb_set_intfdata (intf, uvd); return 0; } return -EIO; diff -Nru a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c --- a/drivers/usb/media/ov511.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/ov511.c Fri Dec 27 23:56:13 2002 @@ -6247,7 +6247,7 @@ create_proc_ov511_cam(ov); - dev_set_drvdata (&intf->dev, ov); + usb_set_intfdata (intf, ov); return 0; error: @@ -6274,12 +6274,12 @@ 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; diff -Nru a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c --- a/drivers/usb/media/pwc-if.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/pwc-if.c Fri Dec 27 23:56:13 2002 @@ -1840,7 +1840,7 @@ 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 @@ 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; diff -Nru a/drivers/usb/media/se401.c b/drivers/usb/media/se401.c --- a/drivers/usb/media/se401.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/se401.c Fri Dec 27 23:56:13 2002 @@ -1521,15 +1521,15 @@ #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){ diff -Nru a/drivers/usb/media/stv680.c b/drivers/usb/media/stv680.c --- a/drivers/usb/media/stv680.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/stv680.c Fri Dec 27 23:56:13 2002 @@ -1498,7 +1498,7 @@ #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 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 */ diff -Nru a/drivers/usb/media/ultracam.c b/drivers/usb/media/ultracam.c --- a/drivers/usb/media/ultracam.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/ultracam.c Fri Dec 27 23:56:13 2002 @@ -635,7 +635,7 @@ MOD_DEC_USE_COUNT; if (uvd) { - dev_set_drvdata (&intf->dev, uvd); + usb_set_intfdata (intf, uvd); return 0; } return -EIO; diff -Nru a/drivers/usb/media/usbvideo.c b/drivers/usb/media/usbvideo.c --- a/drivers/usb/media/usbvideo.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/usbvideo.c Fri Dec 27 23:56:13 2002 @@ -968,7 +968,7 @@ */ 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 @@ return; } - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); usbvideo_ClientIncModCount(uvd); if (uvd->debug > 0) diff -Nru a/drivers/usb/media/vicam.c b/drivers/usb/media/vicam.c --- a/drivers/usb/media/vicam.c Fri Dec 27 23:56:13 2002 +++ b/drivers/usb/media/vicam.c Fri Dec 27 23:56:13 2002 @@ -1307,7 +1307,7 @@ 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 @@ 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