Received: by 10.192.165.148 with SMTP id m20csp4453imm; Fri, 20 Apr 2018 01:54:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ISG7EkpbQXe/ChpUB1WLlU9aDFahyMDGuOUMzpJ7/JOU+9lQq6IRQmeM+0VWXUPoX9mKT X-Received: by 10.98.33.151 with SMTP id o23mr5364044pfj.202.1524214492069; Fri, 20 Apr 2018 01:54:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524214492; cv=none; d=google.com; s=arc-20160816; b=c77+aHQ+JhRd8MPp8nfJWNfDmYlhC+6lmlIcsv/QwKeJBcM3Z1PAjcOey7btuhnhAe bFKjIwrIFkycRrxdQf51f4QHLyeyA0dNcVwhLxsV2z1STRXle3pjZu/in1Ix5s/R/rpu XfufXMFm3bvZrNy9MzdfuBwwcSzgMrqyHGYqt7dv3e5YVYWtRxMnuMP4E022cUvAb2Kj U99MhJk8wNDdwqwN3WQDKlbm6h0tWdWwd+XLKC6Z87EgvKemIDDs7ecE/kPui4e9FXys QEZ0fP3xSzxtKVC7FAhDPiZDw4gpvXhUqEYK8qOP27fdJl8WV+C9P5krAvMK5Hx/koGc EfLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=uC5ymkogvOvPFcHAH6sw2o3ZIfDnEAWUkKRLmv48430=; b=RGJGbLip/MtW2cwXIK8+jHXArLvfW/pSYCQ14WUcUBTwotAK3VqTlIYbL+MqbGheZa T9EYqPkrCFsMjJyFnwJ0LrByxMXK3s+X8U1b20V3vRxMUirV41ltnfXpmmKpSSMb5RZP aP+/b3pc/AhoU7V1ex29AekxBouHUWl3guINVL4Pko7iSiJvYwQ7zxu9kgdglQagMgDC v2H8QJjN/FeNdmFpVryezdxPc2EgqmhiDMAcmXjkfhrU4lBj0qc1ocZFJSZqUxf43m20 MnkUgleftZOo7Cy6JZ0lFHIEtf94UlNR/NLIitHrYOyoqw8T6/NapH1G/Q6F1Z7UX/3L 3lXA== 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 v31-v6si5508067plg.157.2018.04.20.01.54.38; Fri, 20 Apr 2018 01:54:52 -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 S1754263AbeDTIxN (ORCPT + 99 others); Fri, 20 Apr 2018 04:53:13 -0400 Received: from mout01.posteo.de ([185.67.36.141]:38297 "EHLO mout01.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754245AbeDTIxL (ORCPT ); Fri, 20 Apr 2018 04:53:11 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 0619E210B4 for ; Fri, 20 Apr 2018 10:45:56 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 40S8Zd0H4bz9ryR; Fri, 20 Apr 2018 10:45:44 +0200 (CEST) From: Marc Dietrich To: Wolfram Sang Cc: linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Greg Kroah-Hartman , ac100@lists.launchpad.net, linux-tegra@vger.kernel.org, devel@driverdev.osuosl.org Subject: Re: [PATCH 49/61] staging: nvec: simplify getting .drvdata Date: Fri, 20 Apr 2018 10:45:42 +0200 Message-ID: <1534139.KRlJX3jJQi@ax5200p> In-Reply-To: <20180419140641.27926-50-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> <20180419140641.27926-50-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Donnerstag, 19. April 2018, 16:06:19 CEST schrieb Wolfram Sang: > 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: Marc Dietrich > --- > > Build tested only. buildbot is happy. Please apply individually. > > drivers/staging/nvec/nvec.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c > index 52054a528723..2a5e0dcf4162 100644 > --- a/drivers/staging/nvec/nvec.c > +++ b/drivers/staging/nvec/nvec.c > @@ -925,8 +925,7 @@ static int tegra_nvec_remove(struct platform_device > *pdev) static int nvec_suspend(struct device *dev) > { > int err; > - struct platform_device *pdev = to_platform_device(dev); > - struct nvec_chip *nvec = platform_get_drvdata(pdev); > + struct nvec_chip *nvec = dev_get_drvdata(dev); > struct nvec_msg *msg; > char ap_suspend[] = { NVEC_SLEEP, AP_SUSPEND }; > > @@ -946,8 +945,7 @@ static int nvec_suspend(struct device *dev) > > static int nvec_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct nvec_chip *nvec = platform_get_drvdata(pdev); > + struct nvec_chip *nvec = dev_get_drvdata(dev); > > dev_dbg(nvec->dev, "resuming\n"); > tegra_init_i2c_slave(nvec);