aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/devio.c
diff options
context:
space:
mode:
authorValentina Manea <valentina.manea.m@gmail.com>2014-03-10 04:36:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-10 12:54:56 -0400
commit9b6f0c4b98171f2a354e1e461fefa90ec2baafa6 (patch)
tree33101906d35bc425e78ba6df8c6db18f9a371db1 /drivers/usb/core/devio.c
parent04f7bb9d36d46ac25e2ec9d3a92252585a942385 (diff)
usbcore: rename struct dev_state to struct usb_dev_state
Since it is needed outside usbcore and exposed in include/linux/usb.h, it conflicts with enum dev_state in rt2x00 wireless driver. Mark it as usb specific to avoid conflicts in the future. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r--drivers/usb/core/devio.c112
1 files changed, 56 insertions, 56 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 90e18f6fa2bb..2a8afe6754b8 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -62,7 +62,7 @@
62/* Mutual exclusion for removal, open, and release */ 62/* Mutual exclusion for removal, open, and release */
63DEFINE_MUTEX(usbfs_mutex); 63DEFINE_MUTEX(usbfs_mutex);
64 64
65struct dev_state { 65struct usb_dev_state {
66 struct list_head list; /* state list */ 66 struct list_head list; /* state list */
67 struct usb_device *dev; 67 struct usb_device *dev;
68 struct file *file; 68 struct file *file;
@@ -81,7 +81,7 @@ struct dev_state {
81 81
82struct async { 82struct async {
83 struct list_head asynclist; 83 struct list_head asynclist;
84 struct dev_state *ps; 84 struct usb_dev_state *ps;
85 struct pid *pid; 85 struct pid *pid;
86 const struct cred *cred; 86 const struct cred *cred;
87 unsigned int signr; 87 unsigned int signr;
@@ -151,7 +151,7 @@ static void usbfs_decrease_memory_usage(unsigned amount)
151 atomic_sub(amount, &usbfs_memory_usage); 151 atomic_sub(amount, &usbfs_memory_usage);
152} 152}
153 153
154static int connected(struct dev_state *ps) 154static int connected(struct usb_dev_state *ps)
155{ 155{
156 return (!list_empty(&ps->list) && 156 return (!list_empty(&ps->list) &&
157 ps->dev->state != USB_STATE_NOTATTACHED); 157 ps->dev->state != USB_STATE_NOTATTACHED);
@@ -184,7 +184,7 @@ static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
184static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, 184static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes,
185 loff_t *ppos) 185 loff_t *ppos)
186{ 186{
187 struct dev_state *ps = file->private_data; 187 struct usb_dev_state *ps = file->private_data;
188 struct usb_device *dev = ps->dev; 188 struct usb_device *dev = ps->dev;
189 ssize_t ret = 0; 189 ssize_t ret = 0;
190 unsigned len; 190 unsigned len;
@@ -307,7 +307,7 @@ static void free_async(struct async *as)
307 307
308static void async_newpending(struct async *as) 308static void async_newpending(struct async *as)
309{ 309{
310 struct dev_state *ps = as->ps; 310 struct usb_dev_state *ps = as->ps;
311 unsigned long flags; 311 unsigned long flags;
312 312
313 spin_lock_irqsave(&ps->lock, flags); 313 spin_lock_irqsave(&ps->lock, flags);
@@ -317,7 +317,7 @@ static void async_newpending(struct async *as)
317 317
318static void async_removepending(struct async *as) 318static void async_removepending(struct async *as)
319{ 319{
320 struct dev_state *ps = as->ps; 320 struct usb_dev_state *ps = as->ps;
321 unsigned long flags; 321 unsigned long flags;
322 322
323 spin_lock_irqsave(&ps->lock, flags); 323 spin_lock_irqsave(&ps->lock, flags);
@@ -325,7 +325,7 @@ static void async_removepending(struct async *as)
325 spin_unlock_irqrestore(&ps->lock, flags); 325 spin_unlock_irqrestore(&ps->lock, flags);
326} 326}
327 327
328static struct async *async_getcompleted(struct dev_state *ps) 328static struct async *async_getcompleted(struct usb_dev_state *ps)
329{ 329{
330 unsigned long flags; 330 unsigned long flags;
331 struct async *as = NULL; 331 struct async *as = NULL;
@@ -340,7 +340,7 @@ static struct async *async_getcompleted(struct dev_state *ps)
340 return as; 340 return as;
341} 341}
342 342
343static struct async *async_getpending(struct dev_state *ps, 343static struct async *async_getpending(struct usb_dev_state *ps,
344 void __user *userurb) 344 void __user *userurb)
345{ 345{
346 struct async *as; 346 struct async *as;
@@ -448,7 +448,7 @@ static int copy_urb_data_to_user(u8 __user *userbuffer, struct urb *urb)
448#define AS_CONTINUATION 1 448#define AS_CONTINUATION 1
449#define AS_UNLINK 2 449#define AS_UNLINK 2
450 450
451static void cancel_bulk_urbs(struct dev_state *ps, unsigned bulk_addr) 451static void cancel_bulk_urbs(struct usb_dev_state *ps, unsigned bulk_addr)
452__releases(ps->lock) 452__releases(ps->lock)
453__acquires(ps->lock) 453__acquires(ps->lock)
454{ 454{
@@ -489,7 +489,7 @@ __acquires(ps->lock)
489static void async_completed(struct urb *urb) 489static void async_completed(struct urb *urb)
490{ 490{
491 struct async *as = urb->context; 491 struct async *as = urb->context;
492 struct dev_state *ps = as->ps; 492 struct usb_dev_state *ps = as->ps;
493 struct siginfo sinfo; 493 struct siginfo sinfo;
494 struct pid *pid = NULL; 494 struct pid *pid = NULL;
495 u32 secid = 0; 495 u32 secid = 0;
@@ -529,7 +529,7 @@ static void async_completed(struct urb *urb)
529 wake_up(&ps->wait); 529 wake_up(&ps->wait);
530} 530}
531 531
532static void destroy_async(struct dev_state *ps, struct list_head *list) 532static void destroy_async(struct usb_dev_state *ps, struct list_head *list)
533{ 533{
534 struct urb *urb; 534 struct urb *urb;
535 struct async *as; 535 struct async *as;
@@ -551,7 +551,7 @@ static void destroy_async(struct dev_state *ps, struct list_head *list)
551 spin_unlock_irqrestore(&ps->lock, flags); 551 spin_unlock_irqrestore(&ps->lock, flags);
552} 552}
553 553
554static void destroy_async_on_interface(struct dev_state *ps, 554static void destroy_async_on_interface(struct usb_dev_state *ps,
555 unsigned int ifnum) 555 unsigned int ifnum)
556{ 556{
557 struct list_head *p, *q, hitlist; 557 struct list_head *p, *q, hitlist;
@@ -566,7 +566,7 @@ static void destroy_async_on_interface(struct dev_state *ps,
566 destroy_async(ps, &hitlist); 566 destroy_async(ps, &hitlist);
567} 567}
568 568
569static void destroy_all_async(struct dev_state *ps) 569static void destroy_all_async(struct usb_dev_state *ps)
570{ 570{
571 destroy_async(ps, &ps->async_pending); 571 destroy_async(ps, &ps->async_pending);
572} 572}
@@ -585,7 +585,7 @@ static int driver_probe(struct usb_interface *intf,
585 585
586static void driver_disconnect(struct usb_interface *intf) 586static void driver_disconnect(struct usb_interface *intf)
587{ 587{
588 struct dev_state *ps = usb_get_intfdata(intf); 588 struct usb_dev_state *ps = usb_get_intfdata(intf);
589 unsigned int ifnum = intf->altsetting->desc.bInterfaceNumber; 589 unsigned int ifnum = intf->altsetting->desc.bInterfaceNumber;
590 590
591 if (!ps) 591 if (!ps)
@@ -628,7 +628,7 @@ struct usb_driver usbfs_driver = {
628 .resume = driver_resume, 628 .resume = driver_resume,
629}; 629};
630 630
631static int claimintf(struct dev_state *ps, unsigned int ifnum) 631static int claimintf(struct usb_dev_state *ps, unsigned int ifnum)
632{ 632{
633 struct usb_device *dev = ps->dev; 633 struct usb_device *dev = ps->dev;
634 struct usb_interface *intf; 634 struct usb_interface *intf;
@@ -650,7 +650,7 @@ static int claimintf(struct dev_state *ps, unsigned int ifnum)
650 return err; 650 return err;
651} 651}
652 652
653static int releaseintf(struct dev_state *ps, unsigned int ifnum) 653static int releaseintf(struct usb_dev_state *ps, unsigned int ifnum)
654{ 654{
655 struct usb_device *dev; 655 struct usb_device *dev;
656 struct usb_interface *intf; 656 struct usb_interface *intf;
@@ -670,7 +670,7 @@ static int releaseintf(struct dev_state *ps, unsigned int ifnum)
670 return err; 670 return err;
671} 671}
672 672
673static int checkintf(struct dev_state *ps, unsigned int ifnum) 673static int checkintf(struct usb_dev_state *ps, unsigned int ifnum)
674{ 674{
675 if (ps->dev->state != USB_STATE_CONFIGURED) 675 if (ps->dev->state != USB_STATE_CONFIGURED)
676 return -EHOSTUNREACH; 676 return -EHOSTUNREACH;
@@ -710,7 +710,7 @@ static int findintfep(struct usb_device *dev, unsigned int ep)
710 return -ENOENT; 710 return -ENOENT;
711} 711}
712 712
713static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype, 713static int check_ctrlrecip(struct usb_dev_state *ps, unsigned int requesttype,
714 unsigned int request, unsigned int index) 714 unsigned int request, unsigned int index)
715{ 715{
716 int ret = 0; 716 int ret = 0;
@@ -791,11 +791,11 @@ static struct usb_device *usbdev_lookup_by_devt(dev_t devt)
791static int usbdev_open(struct inode *inode, struct file *file) 791static int usbdev_open(struct inode *inode, struct file *file)
792{ 792{
793 struct usb_device *dev = NULL; 793 struct usb_device *dev = NULL;
794 struct dev_state *ps; 794 struct usb_dev_state *ps;
795 int ret; 795 int ret;
796 796
797 ret = -ENOMEM; 797 ret = -ENOMEM;
798 ps = kmalloc(sizeof(struct dev_state), GFP_KERNEL); 798 ps = kmalloc(sizeof(struct usb_dev_state), GFP_KERNEL);
799 if (!ps) 799 if (!ps)
800 goto out_free_ps; 800 goto out_free_ps;
801 801
@@ -852,7 +852,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
852 852
853static int usbdev_release(struct inode *inode, struct file *file) 853static int usbdev_release(struct inode *inode, struct file *file)
854{ 854{
855 struct dev_state *ps = file->private_data; 855 struct usb_dev_state *ps = file->private_data;
856 struct usb_device *dev = ps->dev; 856 struct usb_device *dev = ps->dev;
857 unsigned int ifnum; 857 unsigned int ifnum;
858 struct async *as; 858 struct async *as;
@@ -883,7 +883,7 @@ static int usbdev_release(struct inode *inode, struct file *file)
883 return 0; 883 return 0;
884} 884}
885 885
886static int proc_control(struct dev_state *ps, void __user *arg) 886static int proc_control(struct usb_dev_state *ps, void __user *arg)
887{ 887{
888 struct usb_device *dev = ps->dev; 888 struct usb_device *dev = ps->dev;
889 struct usbdevfs_ctrltransfer ctrl; 889 struct usbdevfs_ctrltransfer ctrl;
@@ -970,7 +970,7 @@ static int proc_control(struct dev_state *ps, void __user *arg)
970 return ret; 970 return ret;
971} 971}
972 972
973static int proc_bulk(struct dev_state *ps, void __user *arg) 973static int proc_bulk(struct usb_dev_state *ps, void __user *arg)
974{ 974{
975 struct usb_device *dev = ps->dev; 975 struct usb_device *dev = ps->dev;
976 struct usbdevfs_bulktransfer bulk; 976 struct usbdevfs_bulktransfer bulk;
@@ -1043,7 +1043,7 @@ static int proc_bulk(struct dev_state *ps, void __user *arg)
1043 return ret; 1043 return ret;
1044} 1044}
1045 1045
1046static int proc_resetep(struct dev_state *ps, void __user *arg) 1046static int proc_resetep(struct usb_dev_state *ps, void __user *arg)
1047{ 1047{
1048 unsigned int ep; 1048 unsigned int ep;
1049 int ret; 1049 int ret;
@@ -1060,7 +1060,7 @@ static int proc_resetep(struct dev_state *ps, void __user *arg)
1060 return 0; 1060 return 0;
1061} 1061}
1062 1062
1063static int proc_clearhalt(struct dev_state *ps, void __user *arg) 1063static int proc_clearhalt(struct usb_dev_state *ps, void __user *arg)
1064{ 1064{
1065 unsigned int ep; 1065 unsigned int ep;
1066 int pipe; 1066 int pipe;
@@ -1082,7 +1082,7 @@ static int proc_clearhalt(struct dev_state *ps, void __user *arg)
1082 return usb_clear_halt(ps->dev, pipe); 1082 return usb_clear_halt(ps->dev, pipe);
1083} 1083}
1084 1084
1085static int proc_getdriver(struct dev_state *ps, void __user *arg) 1085static int proc_getdriver(struct usb_dev_state *ps, void __user *arg)
1086{ 1086{
1087 struct usbdevfs_getdriver gd; 1087 struct usbdevfs_getdriver gd;
1088 struct usb_interface *intf; 1088 struct usb_interface *intf;
@@ -1101,7 +1101,7 @@ static int proc_getdriver(struct dev_state *ps, void __user *arg)
1101 return ret; 1101 return ret;
1102} 1102}
1103 1103
1104static int proc_connectinfo(struct dev_state *ps, void __user *arg) 1104static int proc_connectinfo(struct usb_dev_state *ps, void __user *arg)
1105{ 1105{
1106 struct usbdevfs_connectinfo ci = { 1106 struct usbdevfs_connectinfo ci = {
1107 .devnum = ps->dev->devnum, 1107 .devnum = ps->dev->devnum,
@@ -1113,12 +1113,12 @@ static int proc_connectinfo(struct dev_state *ps, void __user *arg)
1113 return 0; 1113 return 0;
1114} 1114}
1115 1115
1116static int proc_resetdevice(struct dev_state *ps) 1116static int proc_resetdevice(struct usb_dev_state *ps)
1117{ 1117{
1118 return usb_reset_device(ps->dev); 1118 return usb_reset_device(ps->dev);
1119} 1119}
1120 1120
1121static int proc_setintf(struct dev_state *ps, void __user *arg) 1121static int proc_setintf(struct usb_dev_state *ps, void __user *arg)
1122{ 1122{
1123 struct usbdevfs_setinterface setintf; 1123 struct usbdevfs_setinterface setintf;
1124 int ret; 1124 int ret;
@@ -1131,7 +1131,7 @@ static int proc_setintf(struct dev_state *ps, void __user *arg)
1131 setintf.altsetting); 1131 setintf.altsetting);
1132} 1132}
1133 1133
1134static int proc_setconfig(struct dev_state *ps, void __user *arg) 1134static int proc_setconfig(struct usb_dev_state *ps, void __user *arg)
1135{ 1135{
1136 int u; 1136 int u;
1137 int status = 0; 1137 int status = 0;
@@ -1179,7 +1179,7 @@ static int proc_setconfig(struct dev_state *ps, void __user *arg)
1179 return status; 1179 return status;
1180} 1180}
1181 1181
1182static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb, 1182static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb,
1183 struct usbdevfs_iso_packet_desc __user *iso_frame_desc, 1183 struct usbdevfs_iso_packet_desc __user *iso_frame_desc,
1184 void __user *arg) 1184 void __user *arg)
1185{ 1185{
@@ -1508,7 +1508,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb,
1508 return ret; 1508 return ret;
1509} 1509}
1510 1510
1511static int proc_submiturb(struct dev_state *ps, void __user *arg) 1511static int proc_submiturb(struct usb_dev_state *ps, void __user *arg)
1512{ 1512{
1513 struct usbdevfs_urb uurb; 1513 struct usbdevfs_urb uurb;
1514 1514
@@ -1520,7 +1520,7 @@ static int proc_submiturb(struct dev_state *ps, void __user *arg)
1520 arg); 1520 arg);
1521} 1521}
1522 1522
1523static int proc_unlinkurb(struct dev_state *ps, void __user *arg) 1523static int proc_unlinkurb(struct usb_dev_state *ps, void __user *arg)
1524{ 1524{
1525 struct urb *urb; 1525 struct urb *urb;
1526 struct async *as; 1526 struct async *as;
@@ -1580,7 +1580,7 @@ err_out:
1580 return -EFAULT; 1580 return -EFAULT;
1581} 1581}
1582 1582
1583static struct async *reap_as(struct dev_state *ps) 1583static struct async *reap_as(struct usb_dev_state *ps)
1584{ 1584{
1585 DECLARE_WAITQUEUE(wait, current); 1585 DECLARE_WAITQUEUE(wait, current);
1586 struct async *as = NULL; 1586 struct async *as = NULL;
@@ -1603,7 +1603,7 @@ static struct async *reap_as(struct dev_state *ps)
1603 return as; 1603 return as;
1604} 1604}
1605 1605
1606static int proc_reapurb(struct dev_state *ps, void __user *arg) 1606static int proc_reapurb(struct usb_dev_state *ps, void __user *arg)
1607{ 1607{
1608 struct async *as = reap_as(ps); 1608 struct async *as = reap_as(ps);
1609 if (as) { 1609 if (as) {
@@ -1616,7 +1616,7 @@ static int proc_reapurb(struct dev_state *ps, void __user *arg)
1616 return -EIO; 1616 return -EIO;
1617} 1617}
1618 1618
1619static int proc_reapurbnonblock(struct dev_state *ps, void __user *arg) 1619static int proc_reapurbnonblock(struct usb_dev_state *ps, void __user *arg)
1620{ 1620{
1621 int retval; 1621 int retval;
1622 struct async *as; 1622 struct async *as;
@@ -1631,7 +1631,7 @@ static int proc_reapurbnonblock(struct dev_state *ps, void __user *arg)
1631} 1631}
1632 1632
1633#ifdef CONFIG_COMPAT 1633#ifdef CONFIG_COMPAT
1634static int proc_control_compat(struct dev_state *ps, 1634static int proc_control_compat(struct usb_dev_state *ps,
1635 struct usbdevfs_ctrltransfer32 __user *p32) 1635 struct usbdevfs_ctrltransfer32 __user *p32)
1636{ 1636{
1637 struct usbdevfs_ctrltransfer __user *p; 1637 struct usbdevfs_ctrltransfer __user *p;
@@ -1644,7 +1644,7 @@ static int proc_control_compat(struct dev_state *ps,
1644 return proc_control(ps, p); 1644 return proc_control(ps, p);
1645} 1645}
1646 1646
1647static int proc_bulk_compat(struct dev_state *ps, 1647static int proc_bulk_compat(struct usb_dev_state *ps,
1648 struct usbdevfs_bulktransfer32 __user *p32) 1648 struct usbdevfs_bulktransfer32 __user *p32)
1649{ 1649{
1650 struct usbdevfs_bulktransfer __user *p; 1650 struct usbdevfs_bulktransfer __user *p;
@@ -1661,7 +1661,7 @@ static int proc_bulk_compat(struct dev_state *ps,
1661 1661
1662 return proc_bulk(ps, p); 1662 return proc_bulk(ps, p);
1663} 1663}
1664static int proc_disconnectsignal_compat(struct dev_state *ps, void __user *arg) 1664static int proc_disconnectsignal_compat(struct usb_dev_state *ps, void __user *arg)
1665{ 1665{
1666 struct usbdevfs_disconnectsignal32 ds; 1666 struct usbdevfs_disconnectsignal32 ds;
1667 1667
@@ -1699,7 +1699,7 @@ static int get_urb32(struct usbdevfs_urb *kurb,
1699 return 0; 1699 return 0;
1700} 1700}
1701 1701
1702static int proc_submiturb_compat(struct dev_state *ps, void __user *arg) 1702static int proc_submiturb_compat(struct usb_dev_state *ps, void __user *arg)
1703{ 1703{
1704 struct usbdevfs_urb uurb; 1704 struct usbdevfs_urb uurb;
1705 1705
@@ -1745,7 +1745,7 @@ static int processcompl_compat(struct async *as, void __user * __user *arg)
1745 return 0; 1745 return 0;
1746} 1746}
1747 1747
1748static int proc_reapurb_compat(struct dev_state *ps, void __user *arg) 1748static int proc_reapurb_compat(struct usb_dev_state *ps, void __user *arg)
1749{ 1749{
1750 struct async *as = reap_as(ps); 1750 struct async *as = reap_as(ps);
1751 if (as) { 1751 if (as) {
@@ -1758,7 +1758,7 @@ static int proc_reapurb_compat(struct dev_state *ps, void __user *arg)
1758 return -EIO; 1758 return -EIO;
1759} 1759}
1760 1760
1761static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg) 1761static int proc_reapurbnonblock_compat(struct usb_dev_state *ps, void __user *arg)
1762{ 1762{
1763 int retval; 1763 int retval;
1764 struct async *as; 1764 struct async *as;
@@ -1775,7 +1775,7 @@ static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg)
1775 1775
1776#endif 1776#endif
1777 1777
1778static int proc_disconnectsignal(struct dev_state *ps, void __user *arg) 1778static int proc_disconnectsignal(struct usb_dev_state *ps, void __user *arg)
1779{ 1779{
1780 struct usbdevfs_disconnectsignal ds; 1780 struct usbdevfs_disconnectsignal ds;
1781 1781
@@ -1786,7 +1786,7 @@ static int proc_disconnectsignal(struct dev_state *ps, void __user *arg)
1786 return 0; 1786 return 0;
1787} 1787}
1788 1788
1789static int proc_claiminterface(struct dev_state *ps, void __user *arg) 1789static int proc_claiminterface(struct usb_dev_state *ps, void __user *arg)
1790{ 1790{
1791 unsigned int ifnum; 1791 unsigned int ifnum;
1792 1792
@@ -1795,7 +1795,7 @@ static int proc_claiminterface(struct dev_state *ps, void __user *arg)
1795 return claimintf(ps, ifnum); 1795 return claimintf(ps, ifnum);
1796} 1796}
1797 1797
1798static int proc_releaseinterface(struct dev_state *ps, void __user *arg) 1798static int proc_releaseinterface(struct usb_dev_state *ps, void __user *arg)
1799{ 1799{
1800 unsigned int ifnum; 1800 unsigned int ifnum;
1801 int ret; 1801 int ret;
@@ -1808,7 +1808,7 @@ static int proc_releaseinterface(struct dev_state *ps, void __user *arg)
1808 return 0; 1808 return 0;
1809} 1809}
1810 1810
1811static int proc_ioctl(struct dev_state *ps, struct usbdevfs_ioctl *ctl) 1811static int proc_ioctl(struct usb_dev_state *ps, struct usbdevfs_ioctl *ctl)
1812{ 1812{
1813 int size; 1813 int size;
1814 void *buf = NULL; 1814 void *buf = NULL;
@@ -1884,7 +1884,7 @@ static int proc_ioctl(struct dev_state *ps, struct usbdevfs_ioctl *ctl)
1884 return retval; 1884 return retval;
1885} 1885}
1886 1886
1887static int proc_ioctl_default(struct dev_state *ps, void __user *arg) 1887static int proc_ioctl_default(struct usb_dev_state *ps, void __user *arg)
1888{ 1888{
1889 struct usbdevfs_ioctl ctrl; 1889 struct usbdevfs_ioctl ctrl;
1890 1890
@@ -1894,7 +1894,7 @@ static int proc_ioctl_default(struct dev_state *ps, void __user *arg)
1894} 1894}
1895 1895
1896#ifdef CONFIG_COMPAT 1896#ifdef CONFIG_COMPAT
1897static int proc_ioctl_compat(struct dev_state *ps, compat_uptr_t arg) 1897static int proc_ioctl_compat(struct usb_dev_state *ps, compat_uptr_t arg)
1898{ 1898{
1899 struct usbdevfs_ioctl32 __user *uioc; 1899 struct usbdevfs_ioctl32 __user *uioc;
1900 struct usbdevfs_ioctl ctrl; 1900 struct usbdevfs_ioctl ctrl;
@@ -1912,7 +1912,7 @@ static int proc_ioctl_compat(struct dev_state *ps, compat_uptr_t arg)
1912} 1912}
1913#endif 1913#endif
1914 1914
1915static int proc_claim_port(struct dev_state *ps, void __user *arg) 1915static int proc_claim_port(struct usb_dev_state *ps, void __user *arg)
1916{ 1916{
1917 unsigned portnum; 1917 unsigned portnum;
1918 int rc; 1918 int rc;
@@ -1926,7 +1926,7 @@ static int proc_claim_port(struct dev_state *ps, void __user *arg)
1926 return rc; 1926 return rc;
1927} 1927}
1928 1928
1929static int proc_release_port(struct dev_state *ps, void __user *arg) 1929static int proc_release_port(struct usb_dev_state *ps, void __user *arg)
1930{ 1930{
1931 unsigned portnum; 1931 unsigned portnum;
1932 1932
@@ -1935,7 +1935,7 @@ static int proc_release_port(struct dev_state *ps, void __user *arg)
1935 return usb_hub_release_port(ps->dev, portnum, ps); 1935 return usb_hub_release_port(ps->dev, portnum, ps);
1936} 1936}
1937 1937
1938static int proc_get_capabilities(struct dev_state *ps, void __user *arg) 1938static int proc_get_capabilities(struct usb_dev_state *ps, void __user *arg)
1939{ 1939{
1940 __u32 caps; 1940 __u32 caps;
1941 1941
@@ -1951,7 +1951,7 @@ static int proc_get_capabilities(struct dev_state *ps, void __user *arg)
1951 return 0; 1951 return 0;
1952} 1952}
1953 1953
1954static int proc_disconnect_claim(struct dev_state *ps, void __user *arg) 1954static int proc_disconnect_claim(struct usb_dev_state *ps, void __user *arg)
1955{ 1955{
1956 struct usbdevfs_disconnect_claim dc; 1956 struct usbdevfs_disconnect_claim dc;
1957 struct usb_interface *intf; 1957 struct usb_interface *intf;
@@ -1991,7 +1991,7 @@ static int proc_disconnect_claim(struct dev_state *ps, void __user *arg)
1991static long usbdev_do_ioctl(struct file *file, unsigned int cmd, 1991static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
1992 void __user *p) 1992 void __user *p)
1993{ 1993{
1994 struct dev_state *ps = file->private_data; 1994 struct usb_dev_state *ps = file->private_data;
1995 struct inode *inode = file_inode(file); 1995 struct inode *inode = file_inode(file);
1996 struct usb_device *dev = ps->dev; 1996 struct usb_device *dev = ps->dev;
1997 int ret = -ENOTTY; 1997 int ret = -ENOTTY;
@@ -2192,7 +2192,7 @@ static long usbdev_compat_ioctl(struct file *file, unsigned int cmd,
2192static unsigned int usbdev_poll(struct file *file, 2192static unsigned int usbdev_poll(struct file *file,
2193 struct poll_table_struct *wait) 2193 struct poll_table_struct *wait)
2194{ 2194{
2195 struct dev_state *ps = file->private_data; 2195 struct usb_dev_state *ps = file->private_data;
2196 unsigned int mask = 0; 2196 unsigned int mask = 0;
2197 2197
2198 poll_wait(file, &ps->wait, wait); 2198 poll_wait(file, &ps->wait, wait);
@@ -2218,11 +2218,11 @@ const struct file_operations usbdev_file_operations = {
2218 2218
2219static void usbdev_remove(struct usb_device *udev) 2219static void usbdev_remove(struct usb_device *udev)
2220{ 2220{
2221 struct dev_state *ps; 2221 struct usb_dev_state *ps;
2222 struct siginfo sinfo; 2222 struct siginfo sinfo;
2223 2223
2224 while (!list_empty(&udev->filelist)) { 2224 while (!list_empty(&udev->filelist)) {
2225 ps = list_entry(udev->filelist.next, struct dev_state, list); 2225 ps = list_entry(udev->filelist.next, struct usb_dev_state, list);
2226 destroy_all_async(ps); 2226 destroy_all_async(ps);
2227 wake_up_all(&ps->wait); 2227 wake_up_all(&ps->wait);
2228 list_del_init(&ps->list); 2228 list_del_init(&ps->list);