Re: [PATCH] usb: phy: am335x: fix randconfig errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 20, 2013 at 7:05 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> by using SET_SYSTEM_SLEEP_PM_OPS, we will make
> sure that we don't use undefined functions.
>
> Signed-off-by: Felipe Balbi <balbi@xxxxxx>

You could optimize this a bit further:

--- a/drivers/usb/phy/phy-am335x.c
+++ b/drivers/usb/phy/phy-am335x.c
@@ -122,16 +122,9 @@ static int am335x_phy_resume(struct device *dev)

        return 0;
 }
-#define DEV_PM_OPS     (&am335x_pm_ops)
-#else
-#define DEV_PM_OPS     NULL
 #endif

-
-static const struct dev_pm_ops am335x_pm_ops = {
-       .suspend = am335x_phy_suspend,
-       .resume = am335x_phy_resume,
-};
+static SIMPLE_DEV_PM_OPS(am335x_pm_ops, am335x_phy_suspend, am335x_phy_resume);

 static const struct of_device_id am335x_phy_ids[] = {
        { .compatible = "ti,am335x-usb-phy" },
@@ -145,7 +138,7 @@ static struct platform_driver am335x_phy_driver = {
        .driver         = {
                .name   = "am335x-phy-driver",
                .owner  = THIS_MODULE,
-               .pm = DEV_PM_OPS,
+               .pm = &am335x_pm_ops,
                .of_match_table = am335x_phy_ids,
        },
 };
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux