Received: by 10.192.165.148 with SMTP id m20csp2589818imm; Sun, 22 Apr 2018 10:16:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx484J7Y1hVWAHsHT02a7sXJeGME/wxej35QGwnzqd7tfrVnisdtt0JIHEEkG53jOijOKKVXx X-Received: by 2002:a17:902:bd8e:: with SMTP id q14-v6mr18358297pls.322.1524417395272; Sun, 22 Apr 2018 10:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524417395; cv=none; d=google.com; s=arc-20160816; b=rllFr/nwTOHDVXVUvAKrWGRkA5P5BKo3d4XUWcj/HfdjhwIO1ED00KjtQxr54Er2dK BYsMH0ROmxwuQL3gCmPOm965l+6I3T/oIyjeJEv/XyJlihyHVvYx4y3ba0x9kXTlda4H Hdk1PRFgsPE6EUVKOuqs4goVA7hUFrrRBYZCWXeUWP/UHwcb/HhAVS26c+fCp8YJo/im ZcEliEFAuaclZ1SN+RWdRGDORQtwSgPvV3AzxzlSgX2ynysNWWSITMwXsYD8+Z7WC46e IkzFiCBcmC4nXi6dCpFcDZhT0pMamfvu9RSUH9RwFS7B0UEVrUMjE6iNZSibD6tlG20j YA8w== 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:subject:cc:to:from:date :arc-authentication-results; bh=DJzsgS0BIwJRqdEBiTsBJprHPr7eTBfE1li9bv9jHPQ=; b=qPr4B2yA5xidLFp9U9uvArConkkgMEkhYNVy/oC9We8lDtDGgD/nkK5umpP/VwBFGM L8tmk437+I3UY6dZIQFaA3ALVaWQpbyTfcfRFoEDBM79UuguG17LjligHfKLM1XiLU1c OO2IRzWlasgK5wie36V11FJEFfVbn2O6Wa7ghSkuwGL55ldlf7D/u60pvxaiq6JSldKB g2GLoYYNid6wPcolQ8VbR9I349TUqSih7zS++5OUsBaqfLEWgCkui6uK1jsn2wVMwV/R G4nLfV4+FKejTtw/ptMoYMUpMPaQ38XqEnhFus4fI//wR7Vnna7P3s+PJ2BUvZL+McdK OfMg== 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 t14-v6si10386800plm.588.2018.04.22.10.16.21; Sun, 22 Apr 2018 10:16:35 -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 S1753404AbeDVROI (ORCPT + 99 others); Sun, 22 Apr 2018 13:14:08 -0400 Received: from mail.bootlin.com ([62.4.15.54]:46273 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564AbeDVROG (ORCPT ); Sun, 22 Apr 2018 13:14:06 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 6948F206A0; Sun, 22 Apr 2018 19:14:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [195.53.49.241]) by mail.bootlin.com (Postfix) with ESMTPSA id 365022076C; Sun, 22 Apr 2018 19:13:35 +0200 (CEST) Date: Sun, 22 Apr 2018 19:13:34 +0200 From: Boris Brezillon To: Wolfram Sang Cc: linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Robert Jarzmik , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org Subject: Re: [PATCH 29/61] mtd: devices: simplify getting .drvdata Message-ID: <20180422191334.784f7723@bbrezillon> In-Reply-To: <20180419140641.27926-30-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> <20180419140641.27926-30-wsa+renesas@sang-engineering.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Apr 2018 16:05:59 +0200 Wolfram Sang wrote: > We should get drvdata from struct device directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang Applied to mtd/next. Thanks, Boris > --- > > Build tested only. buildbot is happy. Please apply individually. > > drivers/mtd/devices/docg3.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c > index c594fe5eac08..802d8f159e90 100644 > --- a/drivers/mtd/devices/docg3.c > +++ b/drivers/mtd/devices/docg3.c > @@ -1470,8 +1470,7 @@ static struct docg3 *sysfs_dev2docg3(struct device *dev, > struct device_attribute *attr) > { > int floor; > - struct platform_device *pdev = to_platform_device(dev); > - struct mtd_info **docg3_floors = platform_get_drvdata(pdev); > + struct mtd_info **docg3_floors = dev_get_drvdata(dev); > > floor = attr->attr.name[1] - '0'; > if (floor < 0 || floor >= DOC_MAX_NBFLOORS)