lkml.org 
[lkml]   [2019]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH next 15/25] media: platform: Use dev_get_drvdata()
    Date
    Using dev_get_drvdata directly.

    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: Benson Leung <bleung@chromium.org>
    Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
    Cc: linux-media@vger.kernel.org
    Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
    ---
    drivers/media/platform/cros-ec-cec/cros-ec-cec.c | 6 ++----
    1 file changed, 2 insertions(+), 4 deletions(-)

    diff --git a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
    index 7bc4d8a9af28..2e218c7a3a1f 100644
    --- a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
    +++ b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
    @@ -174,8 +174,7 @@ static const struct cec_adap_ops cros_ec_cec_ops = {
    #ifdef CONFIG_PM_SLEEP
    static int cros_ec_cec_suspend(struct device *dev)
    {
    - struct platform_device *pdev = to_platform_device(dev);
    - struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(&pdev->dev);
    + struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(dev);

    if (device_may_wakeup(dev))
    enable_irq_wake(cros_ec_cec->cros_ec->irq);
    @@ -185,8 +184,7 @@ static int cros_ec_cec_suspend(struct device *dev)

    static int cros_ec_cec_resume(struct device *dev)
    {
    - struct platform_device *pdev = to_platform_device(dev);
    - struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(&pdev->dev);
    + struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(dev);

    if (device_may_wakeup(dev))
    disable_irq_wake(cros_ec_cec->cros_ec->irq);
    --
    2.20.1
    \
     
     \ /
      Last update: 2019-04-23 09:42    [W:5.172 / U:0.152 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site