Commit 9b6f0c4b authored by Valentina Manea's avatar Valentina Manea Committed by Greg Kroah-Hartman

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: default avatarValentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 04f7bb9d
...@@ -395,7 +395,7 @@ static int stub_probe(struct usb_device *udev) ...@@ -395,7 +395,7 @@ static int stub_probe(struct usb_device *udev)
* (struct dev_state) as long as it is unique. * (struct dev_state) as long as it is unique.
*/ */
rc = usb_hub_claim_port(udev->parent, udev->portnum, rc = usb_hub_claim_port(udev->parent, udev->portnum,
(struct dev_state *) udev); (struct usb_dev_state *) udev);
if (rc) { if (rc) {
dev_dbg(&udev->dev, "unable to claim port\n"); dev_dbg(&udev->dev, "unable to claim port\n");
return rc; return rc;
...@@ -464,7 +464,7 @@ static void stub_disconnect(struct usb_device *udev) ...@@ -464,7 +464,7 @@ static void stub_disconnect(struct usb_device *udev)
/* release port */ /* release port */
rc = usb_hub_release_port(udev->parent, udev->portnum, rc = usb_hub_release_port(udev->parent, udev->portnum,
(struct dev_state *) udev); (struct usb_dev_state *) udev);
if (rc) { if (rc) {
dev_dbg(&udev->dev, "unable to release port\n"); dev_dbg(&udev->dev, "unable to release port\n");
return; return;
......
This diff is collapsed.
...@@ -1788,7 +1788,7 @@ hub_ioctl(struct usb_interface *intf, unsigned int code, void *user_data) ...@@ -1788,7 +1788,7 @@ hub_ioctl(struct usb_interface *intf, unsigned int code, void *user_data)
* to one of these "claimed" ports, the program will "own" the device. * to one of these "claimed" ports, the program will "own" the device.
*/ */
static int find_port_owner(struct usb_device *hdev, unsigned port1, static int find_port_owner(struct usb_device *hdev, unsigned port1,
struct dev_state ***ppowner) struct usb_dev_state ***ppowner)
{ {
struct usb_hub *hub = usb_hub_to_struct_hub(hdev); struct usb_hub *hub = usb_hub_to_struct_hub(hdev);
...@@ -1806,10 +1806,10 @@ static int find_port_owner(struct usb_device *hdev, unsigned port1, ...@@ -1806,10 +1806,10 @@ static int find_port_owner(struct usb_device *hdev, unsigned port1,
/* In the following three functions, the caller must hold hdev's lock */ /* In the following three functions, the caller must hold hdev's lock */
int usb_hub_claim_port(struct usb_device *hdev, unsigned port1, int usb_hub_claim_port(struct usb_device *hdev, unsigned port1,
struct dev_state *owner) struct usb_dev_state *owner)
{ {
int rc; int rc;
struct dev_state **powner; struct usb_dev_state **powner;
rc = find_port_owner(hdev, port1, &powner); rc = find_port_owner(hdev, port1, &powner);
if (rc) if (rc)
...@@ -1822,10 +1822,10 @@ int usb_hub_claim_port(struct usb_device *hdev, unsigned port1, ...@@ -1822,10 +1822,10 @@ int usb_hub_claim_port(struct usb_device *hdev, unsigned port1,
EXPORT_SYMBOL_GPL(usb_hub_claim_port); EXPORT_SYMBOL_GPL(usb_hub_claim_port);
int usb_hub_release_port(struct usb_device *hdev, unsigned port1, int usb_hub_release_port(struct usb_device *hdev, unsigned port1,
struct dev_state *owner) struct usb_dev_state *owner)
{ {
int rc; int rc;
struct dev_state **powner; struct usb_dev_state **powner;
rc = find_port_owner(hdev, port1, &powner); rc = find_port_owner(hdev, port1, &powner);
if (rc) if (rc)
...@@ -1837,7 +1837,7 @@ int usb_hub_release_port(struct usb_device *hdev, unsigned port1, ...@@ -1837,7 +1837,7 @@ int usb_hub_release_port(struct usb_device *hdev, unsigned port1,
} }
EXPORT_SYMBOL_GPL(usb_hub_release_port); EXPORT_SYMBOL_GPL(usb_hub_release_port);
void usb_hub_release_all_ports(struct usb_device *hdev, struct dev_state *owner) void usb_hub_release_all_ports(struct usb_device *hdev, struct usb_dev_state *owner)
{ {
struct usb_hub *hub = usb_hub_to_struct_hub(hdev); struct usb_hub *hub = usb_hub_to_struct_hub(hdev);
int n; int n;
......
...@@ -89,7 +89,7 @@ struct usb_hub { ...@@ -89,7 +89,7 @@ struct usb_hub {
struct usb_port { struct usb_port {
struct usb_device *child; struct usb_device *child;
struct device dev; struct device dev;
struct dev_state *port_owner; struct usb_dev_state *port_owner;
enum usb_port_connect_type connect_type; enum usb_port_connect_type connect_type;
u8 portnum; u8 portnum;
unsigned power_is_on:1; unsigned power_is_on:1;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include <linux/acpi.h> #include <linux/acpi.h>
struct usb_hub_descriptor; struct usb_hub_descriptor;
struct dev_state; struct usb_dev_state;
/* Functions local to drivers/usb/core/ */ /* Functions local to drivers/usb/core/ */
...@@ -58,7 +58,7 @@ extern void usb_forced_unbind_intf(struct usb_interface *intf); ...@@ -58,7 +58,7 @@ extern void usb_forced_unbind_intf(struct usb_interface *intf);
extern void usb_rebind_intf(struct usb_interface *intf); extern void usb_rebind_intf(struct usb_interface *intf);
extern void usb_hub_release_all_ports(struct usb_device *hdev, extern void usb_hub_release_all_ports(struct usb_device *hdev,
struct dev_state *owner); struct usb_dev_state *owner);
extern bool usb_device_is_owned(struct usb_device *udev); extern bool usb_device_is_owned(struct usb_device *udev);
extern int usb_hub_init(void); extern int usb_hub_init(void);
......
...@@ -366,7 +366,7 @@ struct usb_bus { ...@@ -366,7 +366,7 @@ struct usb_bus {
#endif #endif
}; };
struct dev_state; struct usb_dev_state;
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
...@@ -753,9 +753,9 @@ extern struct usb_host_interface *usb_find_alt_setting( ...@@ -753,9 +753,9 @@ extern struct usb_host_interface *usb_find_alt_setting(
/* port claiming functions */ /* port claiming functions */
int usb_hub_claim_port(struct usb_device *hdev, unsigned port1, int usb_hub_claim_port(struct usb_device *hdev, unsigned port1,
struct dev_state *owner); struct usb_dev_state *owner);
int usb_hub_release_port(struct usb_device *hdev, unsigned port1, int usb_hub_release_port(struct usb_device *hdev, unsigned port1,
struct dev_state *owner); struct usb_dev_state *owner);
/** /**
* usb_make_path - returns stable device path in the usb tree * usb_make_path - returns stable device path in the usb tree
......
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