Received: by 10.192.165.156 with SMTP id m28csp764063imm; Thu, 19 Apr 2018 07:12:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+x+JEVjjFmaQZY+AybCUzAqe2LKP8lJsqs9wnBXEFzjzrb7qc0JCv9v2cvDKbWwWcMmBxG X-Received: by 10.99.127.89 with SMTP id p25mr5297707pgn.440.1524147177633; Thu, 19 Apr 2018 07:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147177; cv=none; d=google.com; s=arc-20160816; b=MgvcPSvdsQRKvSzGHh/f7i/+D1nORpiWEWZ6wPEvDCEDlj1xS+Vwj+YYDCows29ryK m7NpdyzVhD6PU+3ocXkEIkwNdfe0pVpjtqGelvIlUqVXyd3B0OcHI+hm4bOfQOd6FqvW l4b7WuBVG9eJArrLx/1AbfnDRdFXsMfEzat+sdevcnDvNXzjWm4GVQEusRI8CWP09QdC Eor4qNe37NeJBurKS6Ajcxm20J0wOSe1apPfc5cPpnYnFC5Ewog0D7L2owCsmD/Boeb8 Q9uiBXSiogqAfuwvYp8MnhZdGFvQbYiHWLuMvefI4feXXWfQj1lBmg8dPdCoUhq3d+6B L4dA== 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=P1Wm9fwugnTT2PcA4cqlxQq7evd63XOj4lHPNXhpq6U=; b=RaICMU/zvZA5iYRBBSwoVNka08gIfCkIWOviLz5VeAJ2gdM/INslMwNqyk15S48rvx gbTRCo6a6Mj/+mpiZ9wyN9HS1OtyCAbpEpQNk6mkjrnFemBnYSurWKjhSrjYe5C7Wo8O hxMIwvE0oQsoek6RmZ42aTmqzZcih5qiBDSU1+C+O/JdKpoqNRpFyURk+QRz7tYM2BhJ SZ61qb0ONs6dJO5Tzu+Q/JkK+BYd4NiEXghNuUALATVIYzFiIjKt5O6eqq8bXPisqG24 15Pbyu/4RRC5hU4D0S8ddfqlrQrS5kI92dJ4B+9IPqEgyU4vinqp0UzrGzFcrnRvE4Qw OBwg== 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 v6si2967291pgs.140.2018.04.19.07.12.43; Thu, 19 Apr 2018 07:12:57 -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 S1753814AbeDSOK3 (ORCPT + 99 others); Thu, 19 Apr 2018 10:10:29 -0400 Received: from sauhun.de ([88.99.104.3]:45270 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752640AbeDSOHN (ORCPT ); Thu, 19 Apr 2018 10:07:13 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id C5CFA3139DB; Thu, 19 Apr 2018 16:07:12 +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 , Greg Kroah-Hartman Subject: [PATCH 54/61] uio: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:24 +0200 Message-Id: <20180419140641.27926-55-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/uio/uio_fsl_elbc_gpcm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/uio/uio_fsl_elbc_gpcm.c b/drivers/uio/uio_fsl_elbc_gpcm.c index b46323d9dc18..50b460c540f7 100644 --- a/drivers/uio/uio_fsl_elbc_gpcm.c +++ b/drivers/uio/uio_fsl_elbc_gpcm.c @@ -73,8 +73,7 @@ DEVICE_ATTR(reg_or, S_IRUGO|S_IWUSR|S_IWGRP, reg_show, reg_store); static ssize_t reg_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct platform_device *pdev = to_platform_device(dev); - struct uio_info *info = platform_get_drvdata(pdev); + struct uio_info *info = dev_get_drvdata(dev); struct fsl_elbc_gpcm *priv = info->priv; struct fsl_lbc_bank *bank = &priv->lbc->bank[priv->bank]; @@ -93,8 +92,7 @@ static ssize_t reg_show(struct device *dev, struct device_attribute *attr, static ssize_t reg_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - struct platform_device *pdev = to_platform_device(dev); - struct uio_info *info = platform_get_drvdata(pdev); + struct uio_info *info = dev_get_drvdata(dev); struct fsl_elbc_gpcm *priv = info->priv; struct fsl_lbc_bank *bank = &priv->lbc->bank[priv->bank]; unsigned long val; -- 2.11.0