diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-12-14 13:35:09 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-10 15:43:47 +0100 |
commit | c0afc799fb9a19a11f651596fe23b4b755593887 (patch) | |
tree | 9c27f1533193d31757744b22b2af9186d23e67ed /include/usb | |
parent | e70b9d7a74698f1374244b2251216428db920aed (diff) | |
download | barebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.gz barebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.xz |
Rename struct device_d to device
The '_d' suffix was originally introduced in case we want to import
Linux struct device as a separate struct into barebox. Over time it
became clear that this won't happen, instead barebox struct device_d
is basically the same as Linux struct device. Rename the struct name
accordingly to make porting Linux code easier.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/usb')
-rw-r--r-- | include/usb/chipidea-imx.h | 8 | ||||
-rw-r--r-- | include/usb/ehci.h | 4 | ||||
-rw-r--r-- | include/usb/fsl_usb2.h | 2 | ||||
-rw-r--r-- | include/usb/gadget.h | 12 | ||||
-rw-r--r-- | include/usb/musb.h | 2 | ||||
-rw-r--r-- | include/usb/phy.h | 2 | ||||
-rw-r--r-- | include/usb/usb.h | 6 |
7 files changed, 19 insertions, 17 deletions
diff --git a/include/usb/chipidea-imx.h b/include/usb/chipidea-imx.h index 772f48c631..b0b75d3bcb 100644 --- a/include/usb/chipidea-imx.h +++ b/include/usb/chipidea-imx.h @@ -46,15 +46,15 @@ struct imxusb_platformdata { }; #ifdef CONFIG_USB_IMX_CHIPIDEA_USBMISC -int imx_usbmisc_port_init(struct device_d *dev, int port, unsigned flags); -int imx_usbmisc_port_post_init(struct device_d *dev, int port, unsigned flags); +int imx_usbmisc_port_init(struct device *dev, int port, unsigned flags); +int imx_usbmisc_port_post_init(struct device *dev, int port, unsigned flags); #else -static inline int imx_usbmisc_port_init(struct device_d *dev, int port, +static inline int imx_usbmisc_port_init(struct device *dev, int port, unsigned flags) { return 0; } -static inline int imx_usbmisc_port_post_init(struct device_d *dev, int port, +static inline int imx_usbmisc_port_post_init(struct device *dev, int port, unsigned flags) { return 0; diff --git a/include/usb/ehci.h b/include/usb/ehci.h index d937146b4d..9ce6c98ace 100644 --- a/include/usb/ehci.h +++ b/include/usb/ehci.h @@ -24,10 +24,10 @@ struct ehci_data { struct ehci_host; #ifdef CONFIG_USB_EHCI -struct ehci_host *ehci_register(struct device_d *dev, struct ehci_data *data); +struct ehci_host *ehci_register(struct device *dev, struct ehci_data *data); void ehci_unregister(struct ehci_host *); #else -static inline struct ehci_host *ehci_register(struct device_d *dev, +static inline struct ehci_host *ehci_register(struct device *dev, struct ehci_data *data) { return ERR_PTR(-ENOSYS); diff --git a/include/usb/fsl_usb2.h b/include/usb/fsl_usb2.h index 01232da4f9..1d5effb0d6 100644 --- a/include/usb/fsl_usb2.h +++ b/include/usb/fsl_usb2.h @@ -27,7 +27,7 @@ struct fsl_usb2_platform_data { struct fsl_udc; -struct fsl_udc *ci_udc_register(struct device_d *dev, void __iomem *regs); +struct fsl_udc *ci_udc_register(struct device *dev, void __iomem *regs); void ci_udc_unregister(struct fsl_udc *); #endif /* __USB_FSL_USB2_H */ diff --git a/include/usb/gadget.h b/include/usb/gadget.h index 431f316c46..296b2b7481 100644 --- a/include/usb/gadget.h +++ b/include/usb/gadget.h @@ -545,7 +545,7 @@ struct usb_gadget { enum usb_device_speed max_speed; enum usb_device_state state; const char *name; - struct device_d dev; + struct device dev; unsigned out_epnum; unsigned in_epnum; @@ -575,7 +575,7 @@ static inline void *get_gadget_data(struct usb_gadget *gadget) return gadget->dev.priv; } -static inline struct usb_gadget *dev_to_usb_gadget(struct device_d *dev) +static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev) { return container_of(dev, struct usb_gadget, dev); } @@ -923,9 +923,11 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver); */ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); -extern int usb_add_gadget_udc_release(struct device_d *parent, - struct usb_gadget *gadget, void (*release)(struct device_d *dev)); -extern int usb_add_gadget_udc(struct device_d *parent, struct usb_gadget *gadget); +extern int usb_add_gadget_udc_release(struct device *parent, + struct usb_gadget *gadget, + void (*release)(struct device *dev)); +extern int usb_add_gadget_udc(struct device *parent, + struct usb_gadget *gadget); extern void usb_del_gadget_udc(struct usb_gadget *gadget); extern int udc_attach_driver(const char *name, struct usb_gadget_driver *driver); diff --git a/include/usb/musb.h b/include/usb/musb.h index c21428dbf1..fb846dd30b 100644 --- a/include/usb/musb.h +++ b/include/usb/musb.h @@ -97,7 +97,7 @@ struct musb_hdrc_platform_data { const char *clock; /* (HOST or OTG) switch VBUS on/off */ - int (*set_vbus)(struct device_d *dev, int is_on); + int (*set_vbus)(struct device *dev, int is_on); /* (HOST or OTG) mA/2 power supplied on (default = 8mA) */ u8 power; diff --git a/include/usb/phy.h b/include/usb/phy.h index 8f11e70dfd..98a4ce087f 100644 --- a/include/usb/phy.h +++ b/include/usb/phy.h @@ -50,7 +50,7 @@ struct usb_phy_io_ops { }; struct usb_phy { - struct device_d *dev; + struct device *dev; const char *label; unsigned int flags; diff --git a/include/usb/usb.h b/include/usb/usb.h index 04b433ba73..47d3c0fb6a 100644 --- a/include/usb/usb.h +++ b/include/usb/usb.h @@ -116,7 +116,7 @@ struct usb_device { struct usb_device *parent; struct usb_device *children[USB_MAXCHILDREN]; - struct device_d dev; + struct device dev; struct usb_host *host; @@ -161,7 +161,7 @@ struct usb_host { struct list_head list; - struct device_d *hw_dev; + struct device *hw_dev; int busnum; struct usb_device *root_dev; struct usb_phy *usbphy; @@ -477,7 +477,7 @@ enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np, enum usb_device_speed of_usb_get_maximum_speed(struct device_node *np, const char *propname); -int usb_register_otg_device(struct device_d *parent, +int usb_register_otg_device(struct device *parent, int (*set_mode)(void *ctx, enum usb_dr_mode mode), void *ctx); extern struct list_head usb_device_list; |