ChangeSet 1.964, 2002/12/27 15:03:38-08:00, greg@kroah.com [PATCH] USB image 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/image/hpusbscsi.c b/drivers/usb/image/hpusbscsi.c --- a/drivers/usb/image/hpusbscsi.c Fri Dec 27 23:55:56 2002 +++ b/drivers/usb/image/hpusbscsi.c Fri Dec 27 23:55:56 2002 @@ -130,7 +130,7 @@ /* adding to list for module unload */ list_add (&hpusbscsi_devices, &new->lh); - dev_set_drvdata(&intf->dev, new); + usb_set_intfdata(intf, new); return 0; err_out: @@ -143,9 +143,9 @@ static void hpusbscsi_usb_disconnect (struct usb_interface *intf) { - struct hpusbscsi *desc = dev_get_drvdata(&intf->dev); + struct hpusbscsi *desc = usb_get_intfdata(intf); - dev_set_drvdata(&intf->dev, NULL); + usb_set_intfdata(intf, NULL); if (desc) usb_unlink_urb(desc->controlurb); } diff -Nru a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c --- a/drivers/usb/image/mdc800.c Fri Dec 27 23:55:56 2002 +++ b/drivers/usb/image/mdc800.c Fri Dec 27 23:55:56 2002 @@ -523,7 +523,7 @@ up (&mdc800->io_lock); - dev_set_drvdata(&intf->dev, mdc800); + usb_set_intfdata(intf, mdc800); return 0; } @@ -533,7 +533,7 @@ */ static void mdc800_usb_disconnect (struct usb_interface *intf) { - struct mdc800_data* mdc800 = dev_get_drvdata(&intf->dev); + struct mdc800_data* mdc800 = usb_get_intfdata(intf); dbg ("(mdc800_usb_disconnect) called"); @@ -552,7 +552,7 @@ usb_driver_release_interface (&mdc800_usb_driver, intf); mdc800->dev=0; - dev_set_drvdata(&intf->dev, NULL); + usb_set_intfdata(intf, NULL); } info ("Mustek MDC800 disconnected from USB."); } diff -Nru a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c --- a/drivers/usb/image/microtek.c Fri Dec 27 23:55:56 2002 +++ b/drivers/usb/image/microtek.c Fri Dec 27 23:55:56 2002 @@ -774,11 +774,11 @@ static void mts_usb_disconnect (struct usb_interface *intf) { - struct mts_desc* to_remove = dev_get_drvdata(&intf->dev); + struct mts_desc* to_remove = usb_get_intfdata(intf); MTS_DEBUG_GOT_HERE(); - dev_set_drvdata(&intf->dev, NULL); + usb_set_intfdata(intf, NULL); if (to_remove) { /* leave the list - lock it */ down(&mts_list_semaphore); @@ -1007,7 +1007,7 @@ MTS_DEBUG("completed probe and exiting happily\n"); - dev_set_drvdata(&intf->dev, new_desc); + usb_set_intfdata(intf, new_desc); return 0; } diff -Nru a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c --- a/drivers/usb/image/scanner.c Fri Dec 27 23:55:56 2002 +++ b/drivers/usb/image/scanner.c Fri Dec 27 23:55:56 2002 @@ -432,7 +432,7 @@ err("open_scanner(%d): Unable to access minor data", scn_minor); return -ENODEV; } - scn = dev_get_drvdata (&intf->dev); + scn = usb_get_intfdata(intf); dev = scn->scn_dev; @@ -1102,7 +1102,7 @@ up(&scn_mutex); - dev_set_drvdata(&intf->dev, scn); + usb_set_intfdata(intf, scn); /* add device id so the device works when advertised */ intf->kdev = mk_kdev(USB_MAJOR,scn->scn_minor); @@ -1113,12 +1113,12 @@ static void disconnect_scanner(struct usb_interface *intf) { - struct scn_usb_data *scn = dev_get_drvdata(&intf->dev); + struct scn_usb_data *scn = usb_get_intfdata(intf); /* remove device id to disable open() */ intf->kdev = NODEV; - dev_set_drvdata(&intf->dev, NULL); + usb_set_intfdata(intf, NULL); if (scn) { down (&scn_mutex); down (&(scn->sem));