diff options
Diffstat (limited to 'drivers/phy/usb-nop-xceiv.c')
-rw-r--r-- | drivers/phy/usb-nop-xceiv.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/phy/usb-nop-xceiv.c b/drivers/phy/usb-nop-xceiv.c index a9031fa7f8..9a0acf9e7f 100644 --- a/drivers/phy/usb-nop-xceiv.c +++ b/drivers/phy/usb-nop-xceiv.c @@ -1,15 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2016 Sascha Hauer <s.hauer@pengutronix.de> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. */ #include <common.h> @@ -18,7 +9,7 @@ #include <errno.h> #include <driver.h> #include <malloc.h> -#include <usb/phy.h> +#include <linux/usb/phy.h> #include <linux/phy/phy.h> #include <linux/clk.h> #include <linux/err.h> @@ -33,7 +24,7 @@ struct nop_usbphy { int reset; }; -static struct phy *nop_usbphy_xlate(struct device_d *dev, +static struct phy *nop_usbphy_xlate(struct device *dev, struct of_phandle_args *args) { struct nop_usbphy *nopphy = dev->priv; @@ -73,7 +64,7 @@ static const struct phy_ops nop_phy_ops = { .init = nop_usbphy_init, }; -static int nop_usbphy_probe(struct device_d *dev) +static int nop_usbphy_probe(struct device *dev) { int ret; struct nop_usbphy *nopphy; @@ -89,7 +80,7 @@ static int nop_usbphy_probe(struct device_d *dev) if (IS_ERR(nopphy->clk)) nopphy->clk = NULL; - nopphy->reset = of_get_named_gpio_flags(dev->device_node, + nopphy->reset = of_get_named_gpio_flags(dev->of_node, "reset-gpios", 0, &of_flags); if (gpio_is_valid(nopphy->reset)) { /* assert reset */ @@ -139,15 +130,12 @@ static __maybe_unused struct of_device_id nop_usbphy_dt_ids[] = { /* sentinel */ }, }; +MODULE_DEVICE_TABLE(of, nop_usbphy_dt_ids); -static struct driver_d nop_usbphy_driver = { +static struct driver nop_usbphy_driver = { .name = "usb-nop-xceiv", .probe = nop_usbphy_probe, .of_compatible = DRV_OF_COMPAT(nop_usbphy_dt_ids), }; -static int nop_usbphy_driver_init(void) -{ - return platform_driver_register(&nop_usbphy_driver); -} -fs_initcall(nop_usbphy_driver_init); +fs_platform_driver(nop_usbphy_driver); |