Received: by 10.192.165.156 with SMTP id m28csp775219imm; Thu, 19 Apr 2018 07:22:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ehSzxjr+OUV5aNkpERn+SzmX5yimTYenyWHXTqsfE5Q0eQL3Mc24gIXaiMR0qXkmJ0hX3 X-Received: by 2002:a17:902:1e2:: with SMTP id b89-v6mr6433108plb.389.1524147779067; Thu, 19 Apr 2018 07:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147779; cv=none; d=google.com; s=arc-20160816; b=RpCLm8LEjQ1Pg3itvEIa1XsxzLSwP23XGuJI4FOXvO0e11y1TMvAqRA5v2mmSxs4e9 dvSNavXwF5CzBP4Y542NanvNcKlcMBLiT3guQUuBqc4nEfLuKDwqJA/jS9OKXwBcgT7I DUpJciVJ0qNjyE9UoUxcODJ3xfp0oVj3QdI44S3VfE+EoWRiTJtl8HVEmBIBc0vvIBUT XTeU2DyhNg7ulUcTF3nGbfHoE8uMkXVhWXDgCG2cl2lWsLOhbO4xTVFgVLhywWcj1/67 LrWbTAjSWxEsQ35r+mLbTP6w8VhjadkNr7pTFO0aJZ94p5WRDpHTlIWL9qlT61F97FI2 Hagg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=vmNwabIcGuVbUl4uvnqB21eDezR0m/Xl2+4UBy5Zj8g=; b=nx6Vufk55NyqPjssJR7RjBYpWYph4d/SPyuuKAYY5XX4/KucwXoUgqJl1sJKYl6Wli DwBlw4iQOOJFifbjzIZWm6yaGWRv0jfGEE8eahZ3Sg54jZ0GL0qaQy7ftqEemVlLHujN qvo7LH+AVcPVqPzdVVrFYlruLNei6OOPRYNPUaQdMAzdmK9/1tI8rtte00GKORdtHrk6 RuTAfGCr3ANbPwM8XyAybu4gGJ5wouJv87YEVyk6zJcFOlkvIx/aERJ3u7sXhpdkBIC2 kG541m8gdiKhakr9Sd9QgKch3iaryp+aEpXzH8JcW2HTSaPBIkaD62j9bZUw5wUIqUog 3R+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si2998261pgt.243.2018.04.19.07.22.44; Thu, 19 Apr 2018 07:22:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753479AbeDSOVl (ORCPT + 99 others); Thu, 19 Apr 2018 10:21:41 -0400 Received: from sauhun.de ([88.99.104.3]:45272 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753386AbeDSOHA (ORCPT ); Thu, 19 Apr 2018 10:07:00 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 175F03139C5; Thu, 19 Apr 2018 16:06:59 +0200 (CEST) From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Wolfram Sang , "Lad, Prabhakar" , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 25/61] media: platform: am437x: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:55 +0200 Message-Id: <20180419140641.27926-26-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang --- Build tested only. buildbot is happy. Please apply individually. drivers/media/platform/am437x/am437x-vpfe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index 601ae6487617..58ebc2220d0e 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c @@ -2662,8 +2662,7 @@ static void vpfe_save_context(struct vpfe_ccdc *ccdc) static int vpfe_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct vpfe_device *vpfe = platform_get_drvdata(pdev); + struct vpfe_device *vpfe = dev_get_drvdata(dev); struct vpfe_ccdc *ccdc = &vpfe->ccdc; /* if streaming has not started we don't care */ @@ -2720,8 +2719,7 @@ static void vpfe_restore_context(struct vpfe_ccdc *ccdc) static int vpfe_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct vpfe_device *vpfe = platform_get_drvdata(pdev); + struct vpfe_device *vpfe = dev_get_drvdata(dev); struct vpfe_ccdc *ccdc = &vpfe->ccdc; /* if streaming has not started we don't care */ -- 2.11.0