Received: by 10.192.165.156 with SMTP id m28csp789326imm; Thu, 19 Apr 2018 07:36:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/5TNPIV5TkdCmYiT0o+/9Tc+AIxv035OJprQnw5Oj7cX9fi3A/KaXYXkY+76kDmWrNzk8P X-Received: by 10.99.119.2 with SMTP id s2mr5281403pgc.399.1524148570128; Thu, 19 Apr 2018 07:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148570; cv=none; d=google.com; s=arc-20160816; b=vi2/L0T53jDGFofeKYLQy0Qx1shxFfpCQsbWjIJ5frUMw4PWjR1jK1YZ6GxkziLVfH P5czQRZdITKqFn49bAUZUpSJ9dweuN1UCTxgA0gorowZzQDKdzDn2lkdVgGC8LV/KcBo WmPzZURF2E0h9ty0RVHC7B5EKsZInlU8w2r+tEmeyIbpFZC6si9YTRYfmmzNVcgYeTn2 3ESj9g2ZE0rGPs3V2QxS9xq8VLEl2A+sCPTCz75NftXs2xmzwX81NoHnrsTgOuuICN91 0ny09rNzWn1oCiE1h2bs9/PGXNX5tdn4GQTyvZKmv+oIKjhw9PtwRV84lLUaGsRxeDIz TT/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=yZh/DHiFR3xUVyVN3uCC+/OMUsoMKmCunG1/bRi4Es4=; b=u9MJG7E0bQV0X+acBMhyvaEOTsNMwfhmZdlj+RcDWOlPXkT2NqbQL3kvF/y8SfE/ab A675mF0CY+n0z2FP7N926D6d87xiCfv9FHwp2drh3tJhrsJ372Qwc5nLylDDeqNuwhvL f9foFYRTcQqPR4NFhXlzBgWDLCiFBqgJfow0k+5j6jLGx+NVSbhNnNbe4U/fpNU+rbeO 9c2qDZvzCImKADJda8nwB5MOZ+uxrSJAB6KIW85ScQgpjl8ym3KiKdrIX5nbrObpeMSU rxIFhucqNEfSQMx5JL6+yzPcKY2nzAd/O9vwTq/zDz53GLoWkLmRXjPjj6TSxFiq6wpV Afcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ao1Mi2oa; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t76si3020521pgc.627.2018.04.19.07.35.56; Thu, 19 Apr 2018 07:36:10 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ao1Mi2oa; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753353AbeDSOex (ORCPT + 99 others); Thu, 19 Apr 2018 10:34:53 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:42567 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753086AbeDSOeu (ORCPT ); Thu, 19 Apr 2018 10:34:50 -0400 Received: by mail-qk0-f194.google.com with SMTP id j10so5548989qke.9; Thu, 19 Apr 2018 07:34:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yZh/DHiFR3xUVyVN3uCC+/OMUsoMKmCunG1/bRi4Es4=; b=ao1Mi2oarblKtO4hZdnx1qXA6d7hEd+aJdEMrkSGBBzECtNb2mRqE0VEHfHWIsR6Z/ lJz9l9vLtMSExxznMjGHvegmwdC07tzBQ7S3RUuyCX++41PPwyUIaG75e7nhJcRdjDqV 36W1b0I9nTz5DtVOSzKwuWUl7xFAFg3V018Rvhf7VQLssuMyOSIn25ctFn/TWNsFI8sM iJ1m4oOj+amMlRNUqZsSwdEbVw2FXoItH4Ojbi2zO26ZWSfu9AWbCCB6uKfP3zLXxAr0 qSzqOpoPKnUhtpabx9Urvr88hAJroiZ4B8J8f0W4IMbyxCplRGNkX35lZhQEXszHwaWv I1/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yZh/DHiFR3xUVyVN3uCC+/OMUsoMKmCunG1/bRi4Es4=; b=mzK4bTM3SflM6eZ9qLrd7K1YlGN4YV2Bj8GApRJv0Q5JEBQQtIvkVIN2YCPCf8fndM /XUVsK/oh0nADivaEQ/mzTfwEC6ZfTBE6bsJo+J4BvR3QMSdcxDkCqzo1Tp+BBBBOxPY 88n4H001zn24/pewgb96+kHO2gjnWJNSUr8oWHwLE95gKT2wEHN1tWNCwmOfq4VUMfK/ 38uYST13/2fuO5WRKxfz+5RpICmWG92uoK2gak6Up6sF4wepX1IjlqSWg88Bb87Yy/y+ RFI6nKtSyvOzNMu4tL52ZqkmHJ+HEbkg/0fU4DxQUhVc9B8ptkoCqtjR4QVL+famBFf4 HpJw== X-Gm-Message-State: ALQs6tC0l/31eckrJf//Kgrwm739ckeZ7Edd2Cme9LD0h2VH7MivlIlf rEbT4Z6cfMWl5AQjkyPT5CmaV4rEvkrFHQVZyVc= X-Received: by 10.233.225.10 with SMTP id g10mr5950222qkm.263.1524148489548; Thu, 19 Apr 2018 07:34:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.71.5 with HTTP; Thu, 19 Apr 2018 07:34:29 -0700 (PDT) In-Reply-To: <20180419140641.27926-4-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> <20180419140641.27926-4-wsa+renesas@sang-engineering.com> From: Miguel Ojeda Date: Thu, 19 Apr 2018 16:34:29 +0200 Message-ID: Subject: Re: [PATCH 03/61] auxdisplay: simplify getting .drvdata To: Wolfram Sang Cc: linux-kernel , linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Linus Walleij Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [CC'ing Linus W.] On Thu, Apr 19, 2018 at 4:05 PM, 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 Seems fine and other drivers in platform/ also call dev_get_drvdata directly for this. If Linus does not have anything against it, I will put it in my queue. Thanks, Miguel > --- > > Build tested only. buildbot is happy. Please apply individually. > > drivers/auxdisplay/arm-charlcd.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c > index b3176ee92b90..26246ab7a066 100644 > --- a/drivers/auxdisplay/arm-charlcd.c > +++ b/drivers/auxdisplay/arm-charlcd.c > @@ -329,8 +329,7 @@ static int __init charlcd_probe(struct platform_device *pdev) > > static int charlcd_suspend(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct charlcd *lcd = platform_get_drvdata(pdev); > + struct charlcd *lcd = dev_get_drvdata(dev); > > /* Power the display off */ > charlcd_4bit_command(lcd, HD_DISPCTRL); > @@ -339,8 +338,7 @@ static int charlcd_suspend(struct device *dev) > > static int charlcd_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct charlcd *lcd = platform_get_drvdata(pdev); > + struct charlcd *lcd = dev_get_drvdata(dev); > > /* Turn the display back on */ > charlcd_4bit_command(lcd, HD_DISPCTRL | HD_DISPCTRL_ON); > -- > 2.11.0 >