Received: by 10.192.165.156 with SMTP id m28csp774158imm; Thu, 19 Apr 2018 07:21:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx48tb69o8n4fzcihwYtaJyh+KH87UviE0LNKVaOwn4iq+hJBqHg7369aRmGYzUtZiPsYm/UT X-Received: by 10.98.100.11 with SMTP id y11mr2829184pfb.118.1524147715589; Thu, 19 Apr 2018 07:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147715; cv=none; d=google.com; s=arc-20160816; b=0O6sEFqags3nZS8bZGPn8bmDy69WaZROvVaU2mpNH59VCd0yXcR1AhL3z8/5RAuQTM XEaN4bKF9k4KAXc79W+WFRAqJmO2EbcOzjdSDAoIOAakb0aBEBHc34EABMIvoeuerwR0 isdvAaRiGYzTvU2fMGZqLgedM+butmL0rflMwxywCQQWS8N+5rDa5LcTl9tS+ufpdt2g DzOayBzKIGf0YTSXN9iXUrSnkwkryaaNgMMNBIO12h9OMj8SpRtGNeicfAf1+/8z7G2v 5iCK81tYYsi55S60Cok3ajnPh7dAhXfLn8eMNVfhbVqmjHRHDDbkdczRBtKboX2DYGt6 YTeA== 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=HmbuDzh0Yvex/sTQ6skex432GKyNLwoLBkccvSFo91c=; b=rA5vbuFxiHIcYS1HQ1YBot5MqcqYvgtxuuQJjUN/KzEE5uuU1bNhcsqkojY0HOU7Lj QpYyyGDmw3mFnzKoYHT5ivc/4+16xNKqRHV7AnLPlGM95H9//nSgO2YG/H4E7vmusUxM c992IgO7/8ZU04NOOYF6l7htFmN/GpSJw8zBKITpVNE+qLh87GZ0kQKff8SwJFw7Js4f 46BHpUVxdf6zmo5EdoCFee6WBaMiGSwwHvF+cdSWvRn3Ugr6pQ1vGAc9nwzTERRNKDi6 Uk0k2vkCFHNZgaLhNHVrGzEdBFQUOf8Mrgr9g6J5MFYttQeMQl3EnEsUgogaHUuKj9HY uiIQ== 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 r59-v6si3584433plb.218.2018.04.19.07.21.41; Thu, 19 Apr 2018 07:21:55 -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 S1753611AbeDSOUc (ORCPT + 99 others); Thu, 19 Apr 2018 10:20:32 -0400 Received: from sauhun.de ([88.99.104.3]:45448 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753395AbeDSOHC (ORCPT ); Thu, 19 Apr 2018 10:07:02 -0400 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 Cc: linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Wolfram Sang , Kyungmin Park , Kamil Debski , Jeongtae Park , Andrzej Hajda , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-media@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> 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/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; -- 2.11.0