Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207971
b: refs/heads/master
c: c532b29
h: refs/heads/master
i:
  207969: 382924f
  207967: 162b4a6
v: v3
  • Loading branch information
Andi Kleen authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent a050db0 commit 0e68d61
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6e12ea4658487ba9c746e95b31014cb89f63703b
refs/heads/master: c532b29a6f6d31e84a7c88f995eebdc75ebd4248
7 changes: 2 additions & 5 deletions trunk/drivers/usb/core/devio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1668,13 +1668,10 @@ static int proc_ioctl(struct dev_state *ps, struct usbdevfs_ioctl *ctl)
default:
if (intf->dev.driver)
driver = to_usb_driver(intf->dev.driver);
if (driver == NULL || driver->ioctl == NULL) {
if (driver == NULL || driver->unlocked_ioctl == NULL) {
retval = -ENOTTY;
} else {
/* keep API that guarantees BKL */
lock_kernel();
retval = driver->ioctl(intf, ctl->ioctl_code, buf);
unlock_kernel();
retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, buf);
if (retval == -ENOIOCTLCMD)
retval = -ENOTTY;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
return -ENODEV;
}

/* No BKL needed */
static int
hub_ioctl(struct usb_interface *intf, unsigned int code, void *user_data)
{
Expand Down Expand Up @@ -3465,7 +3466,7 @@ static struct usb_driver hub_driver = {
.reset_resume = hub_reset_resume,
.pre_reset = hub_pre_reset,
.post_reset = hub_post_reset,
.ioctl = hub_ioctl,
.unlocked_ioctl = hub_ioctl,
.id_table = hub_id_table,
.supports_autosuspend = 1,
};
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/usb/misc/usbtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,7 @@ test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param,
* off just killing the userspace task and waiting for it to exit.
*/

/* No BKL needed */
static int
usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf)
{
Expand Down Expand Up @@ -2170,7 +2171,7 @@ static struct usb_driver usbtest_driver = {
.name = "usbtest",
.id_table = id_table,
.probe = usbtest_probe,
.ioctl = usbtest_ioctl,
.unlocked_ioctl = usbtest_ioctl,
.disconnect = usbtest_disconnect,
.suspend = usbtest_suspend,
.resume = usbtest_resume,
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ struct usb_driver {

void (*disconnect) (struct usb_interface *intf);

int (*ioctl) (struct usb_interface *intf, unsigned int code,
int (*unlocked_ioctl) (struct usb_interface *intf, unsigned int code,
void *buf);

int (*suspend) (struct usb_interface *intf, pm_message_t message);
Expand Down

0 comments on commit 0e68d61

Please sign in to comment.