From patchwork Thu Apr 19 14:05:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 10350915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1303160231 for ; Thu, 19 Apr 2018 14:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0252628A24 for ; Thu, 19 Apr 2018 14:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9D0E28A37; Thu, 19 Apr 2018 14:42:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6C2D028A24 for ; Thu, 19 Apr 2018 14:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=kCqKZ3El3N0q9e1zF8WyhsoWjCpWpFnHXiZ5gJnLoyo=; b=n3qMIY0uMPNhl+OE7fYaG9WCDf zAlKuLTDNdO1at7hmpuNgF/xt1EcysUlRzQiVlXApMxgfr1DlV5hyQxieixFmATfi/v4zLkTOLjfk M8x1ZlKTPolMEfBMWHjz5JFQxobXoUIHHa/S+JiBkSCRUqgDwOPT4Zm50Ha4JYIbbgy8r3HgDMaq6 MLJ41AeijnR7v8DbCvP6WkE8Nl6G5OkF+bk/cuQshgWL2MnJa1mLWx+UH6Mh0zu2fd3j9tK6kuCGX 0o65MLcdqE/oxqXVDR6O1bj+OYAAvlVVsq7Chm6gAw1qqNBwkToJ3MFBL5qMh4iN1wPLWHUlZ88cL XQ1GLl4A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f9AlX-0004rK-Ij; Thu, 19 Apr 2018 14:42:27 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f9AcW-0006Fd-Ic for linux-arm-kernel@bombadil.infradead.org; Thu, 19 Apr 2018 14:33:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=HmbuDzh0Yvex/sTQ6skex432GKyNLwoLBkccvSFo91c=; b=hMW4MXptQ8cAcdPY45uB1+xdE 4HzdFPupvi3k3HRaPcEptKVdwl0QZhDXjZu8bto1P9kwoJmkrCiq6tzfauV1OlXThgwyzrEl5MGKU lLaVJ1N1IaPosWIsZsTIAjrHJwDi7fTRPYNE97nJgremmXfkWWnAQ7/isqp6ku6fJW+PR7eByiORX E4UHJvTx100R9gOUVoNG9D02qV1KJ5C23FIcKDKBDRbaBKGUMr8G3MEAo61caVr7J3qTwLTvvTCa2 3k/GzOsODsmTVRPk+o3DeKNazcTpXygFvK+SkqY1juZydEbcwakDCEomB1Iso6JdD3Fiafpq/i5tR 9WXi907cA==; Received: from sauhun.de ([88.99.104.3] helo=pokefinder.org) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f9ADP-0004be-Io for linux-arm-kernel@lists.infradead.org; Thu, 19 Apr 2018 14:07:14 +0000 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 015BE3139C7; Thu, 19 Apr 2018 16:06:59 +0200 (CEST) From: Wolfram Sang To: linux-kernel@vger.kernel.org Subject: [PATCH 27/61] media: platform: s5p-mfc: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:57 +0200 Message-Id: <20180419140641.27926-28-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180419_150711_656409_030D163C X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeongtae Park , kernel-janitors@vger.kernel.org, Kamil Debski , linux-renesas-soc@vger.kernel.org, Wolfram Sang , Kyungmin Park , Andrzej Hajda , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Acked-by: Sylwester Nawrocki --- Build tested only. buildbot is happy. Please apply individually. drivers/media/platform/s5p-mfc/s5p_mfc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index a80251ed3143..9ca707cb2a42 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1449,8 +1449,7 @@ static int s5p_mfc_remove(struct platform_device *pdev) static int s5p_mfc_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct s5p_mfc_dev *m_dev = platform_get_drvdata(pdev); + struct s5p_mfc_dev *m_dev = dev_get_drvdata(dev); int ret; if (m_dev->num_inst == 0) @@ -1484,8 +1483,7 @@ static int s5p_mfc_suspend(struct device *dev) static int s5p_mfc_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct s5p_mfc_dev *m_dev = platform_get_drvdata(pdev); + struct s5p_mfc_dev *m_dev = dev_get_drvdata(dev); if (m_dev->num_inst == 0) return 0;