lkml.org 
[lkml]   [2018]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.18 085/135] mfd: omap-usb-host: Fix dts probe of children
    Date
    4.18-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Tony Lindgren <tony@atomide.com>

    [ Upstream commit 10492ee8ed9188d6d420e1f79b2b9bdbc0624e65 ]

    It currently only works if the parent bus uses "simple-bus". We
    currently try to probe children with non-existing compatible values.
    And we're missing .probe.

    I noticed this while testing devices configured to probe using ti-sysc
    interconnect target module driver. For that we also may want to rebind
    the driver, so let's remove __init and __exit.

    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Acked-by: Roger Quadros <rogerq@ti.com>
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/mfd/omap-usb-host.c | 11 ++++++-----
    1 file changed, 6 insertions(+), 5 deletions(-)

    --- a/drivers/mfd/omap-usb-host.c
    +++ b/drivers/mfd/omap-usb-host.c
    @@ -528,8 +528,8 @@ static int usbhs_omap_get_dt_pdata(struc
    }

    static const struct of_device_id usbhs_child_match_table[] = {
    - { .compatible = "ti,omap-ehci", },
    - { .compatible = "ti,omap-ohci", },
    + { .compatible = "ti,ehci-omap", },
    + { .compatible = "ti,ohci-omap3", },
    { }
    };

    @@ -855,6 +855,7 @@ static struct platform_driver usbhs_omap
    .pm = &usbhsomap_dev_pm_ops,
    .of_match_table = usbhs_omap_dt_ids,
    },
    + .probe = usbhs_omap_probe,
    .remove = usbhs_omap_remove,
    };

    @@ -864,9 +865,9 @@ MODULE_ALIAS("platform:" USBHS_DRIVER_NA
    MODULE_LICENSE("GPL v2");
    MODULE_DESCRIPTION("usb host common core driver for omap EHCI and OHCI");

    -static int __init omap_usbhs_drvinit(void)
    +static int omap_usbhs_drvinit(void)
    {
    - return platform_driver_probe(&usbhs_omap_driver, usbhs_omap_probe);
    + return platform_driver_register(&usbhs_omap_driver);
    }

    /*
    @@ -878,7 +879,7 @@ static int __init omap_usbhs_drvinit(voi
    */
    fs_initcall_sync(omap_usbhs_drvinit);

    -static void __exit omap_usbhs_drvexit(void)
    +static void omap_usbhs_drvexit(void)
    {
    platform_driver_unregister(&usbhs_omap_driver);
    }

    \
     
     \ /
      Last update: 2018-10-16 19:40    [W:4.377 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site