summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usb251xb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/usb251xb.c')
-rw-r--r--drivers/usb/misc/usb251xb.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index e282988fb4..465d97e779 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Driver for Microchip USB251xB USB 2.0 Hi-Speed Hub Controller
* Configuration via SMBus.
@@ -116,7 +116,7 @@
#define DRIVER_DESC "Microchip USB 2.0 Hi-Speed Hub Controller"
struct usb251xb {
- struct device_d *dev;
+ struct device *dev;
struct i2c_client *i2c;
u8 skip_config;
int gpio_reset;
@@ -241,7 +241,7 @@ static void usb251xb_reset(struct usb251xb *hub, int state)
static int usb251xb_connect(struct usb251xb *hub)
{
- struct device_d *dev = hub->dev;
+ struct device *dev = hub->dev;
int err, i;
char i2c_wb[USB251XB_I2C_REG_SZ];
@@ -337,8 +337,8 @@ out_err:
static int usb251xb_get_ofdata(struct usb251xb *hub,
struct usb251xb_data *data)
{
- struct device_d *dev = hub->dev;
- struct device_node *np = dev->device_node;
+ struct device *dev = hub->dev;
+ struct device_node *np = dev->of_node;
int len, i;
u32 port, property_u32 = 0;
const u32 *cproperty_u32;
@@ -608,6 +608,7 @@ static const struct of_device_id usb251xb_of_match[] = {
/* sentinel */
}
};
+MODULE_DEVICE_TABLE(of, usb251xb_of_match);
#else /* CONFIG_OFDEVICE */
static int usb251xb_get_ofdata(struct usb251xb *hub,
struct usb251xb_data *data)
@@ -618,8 +619,8 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
static int usb251xb_probe(struct usb251xb *hub)
{
- struct device_d *dev = hub->dev;
- struct device_node *np = dev->device_node;
+ struct device *dev = hub->dev;
+ struct device_node *np = dev->of_node;
const struct of_device_id *of_id = of_match_device(usb251xb_of_match,
dev);
int err;
@@ -644,7 +645,7 @@ static int usb251xb_probe(struct usb251xb *hub)
return 0;
}
-static int usb251xb_i2c_probe(struct device_d *dev)
+static int usb251xb_i2c_probe(struct device *dev)
{
struct i2c_client *i2c = to_i2c_client(dev);
struct usb251xb *hub;
@@ -670,7 +671,7 @@ static const struct platform_device_id usb251xb_id[] = {
{ /* sentinel */ }
};
-static struct driver_d usb251xb_i2c_driver = {
+static struct driver usb251xb_i2c_driver = {
.name = DRIVER_NAME,
.probe = usb251xb_i2c_probe,
.id_table = usb251xb_id,