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)
* (struct dev_state) as long as it is unique.
*/
rc = usb_hub_claim_port(udev->parent, udev->portnum,
(struct dev_state *) udev);
(struct usb_dev_state *) udev);
if (rc) {
dev_dbg(&udev->dev, "unable to claim port\n");
return rc;
......@@ -464,7 +464,7 @@ static void stub_disconnect(struct usb_device *udev)
/* release port */
rc = usb_hub_release_port(udev->parent, udev->portnum,
(struct dev_state *) udev);
(struct usb_dev_state *) udev);
if (rc) {
dev_dbg(&udev->dev, "unable to release port\n");
return;
......
This diff is collapsed.
......@@ -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.
*/
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);
......@@ -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 */
int usb_hub_claim_port(struct usb_device *hdev, unsigned port1,
struct dev_state *owner)
struct usb_dev_state *owner)
{
int rc;
struct dev_state **powner;
struct usb_dev_state **powner;
rc = find_port_owner(hdev, port1, &powner);
if (rc)
......@@ -1822,10 +1822,10 @@ int usb_hub_claim_port(struct usb_device *hdev, unsigned port1,
EXPORT_SYMBOL_GPL(usb_hub_claim_port);
int usb_hub_release_port(struct usb_device *hdev, unsigned port1,
struct dev_state *owner)
struct usb_dev_state *owner)
{
int rc;
struct dev_state **powner;
struct usb_dev_state **powner;
rc = find_port_owner(hdev, port1, &powner);
if (rc)
......@@ -1837,7 +1837,7 @@ int usb_hub_release_port(struct usb_device *hdev, unsigned port1,
}
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);
int n;
......
......@@ -89,7 +89,7 @@ struct usb_hub {
struct usb_port {
struct usb_device *child;
struct device dev;
struct dev_state *port_owner;
struct usb_dev_state *port_owner;
enum usb_port_connect_type connect_type;
u8 portnum;
unsigned power_is_on:1;
......
......@@ -2,7 +2,7 @@
#include <linux/acpi.h>
struct usb_hub_descriptor;
struct dev_state;
struct usb_dev_state;
/* Functions local to drivers/usb/core/ */
......@@ -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_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 int usb_hub_init(void);
......
......@@ -366,7 +366,7 @@ struct usb_bus {
#endif
};
struct dev_state;
struct usb_dev_state;
/* ----------------------------------------------------------------------- */
......@@ -753,9 +753,9 @@ extern struct usb_host_interface *usb_find_alt_setting(
/* port claiming functions */
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,
struct dev_state *owner);
struct usb_dev_state *owner);
/**
* 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