Received: by 10.192.165.156 with SMTP id m28csp780101imm; Thu, 19 Apr 2018 07:27:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx48jN1EQw2R7EefsStTtPZIUnhV9GlHyIza/qfQHnrbaTu+lUxdh9gd3nzS+HUsuRhh2j7wK X-Received: by 2002:a17:902:7508:: with SMTP id i8-v6mr5209375pll.280.1524148060036; Thu, 19 Apr 2018 07:27:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148060; cv=none; d=google.com; s=arc-20160816; b=PLUrFlqI50gx4wg0gq3SaOQEozrWB+PEw1LNcUSEewxAuIiQisdUHhn+ZydGCQfIrp OooFOGUvY7vv/wjFdPNdBY2XT5wJ3jcW75BzlNspDnNATjCRhtBm9ZZObfN4sq54a2RS x+158AWrl7OXayGidRgGdI637eoPitQJKKMm/e/oWO1MeEHunqxLny3ys0oAj9lv4ozh pnNa1KQUs0+OPQHeAjpH9CfTvb2Qy1cD4vGx4NjMvvy0TWx/Tz8Ga9LRecEcXoCtuTxh s3kosL375zi39gmonvePVRrdBzmTl0gczwxpCHpvs+m1GwY1t5SZJ2WeHrU1v50Hxjtv CAYw== 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=06DWpoCS+RvFB3GFzf80LUhpMulqwG96qOL1cebJfJk=; b=tdYEbp/fhRgaiZTqaXWQGVbpcg2LVpMxALq3Ka+PamnYltxpU26fC5/ATEUhKhdFid 08ZP7sfg17AwZ5vULfp+gfjso4/XDvLtfpcO+rIdbPp9FZjYNL68oUgqRBpcOvURgPFt hNNfojYBMreFCo5tYscbBC9kCPBCtvOl6x50oCZNSaPhSp+LBJQIiCZkcgNTfXuEGBmq 6BmS8ob2Musn6RbyZnw9+z+PSc/IRR7aLF73Q0IlTB10ygVasl0HfLrl7xpwpWqqwLCy WdPD14KaUqNlFLdlbNldjBNbBZ6jhHCikBnbN3S+99hlqEQt6B2/DlQNx17LajVCDmsz 9VSA== 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 n1-v6si3550411pld.280.2018.04.19.07.27.26; Thu, 19 Apr 2018 07:27:40 -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 S1753270AbeDSOGx (ORCPT + 99 others); Thu, 19 Apr 2018 10:06:53 -0400 Received: from sauhun.de ([88.99.104.3]:45222 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752100AbeDSOGu (ORCPT ); Thu, 19 Apr 2018 10:06:50 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 19B7C3139AE; Thu, 19 Apr 2018 16:06:48 +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 , Bartlomiej Zolnierkiewicz , Tejun Heo , linux-ide@vger.kernel.org Subject: [PATCH 02/61] ata: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:32 +0200 Message-Id: <20180419140641.27926-3-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/ata/pata_samsung_cf.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c index bb96dc35950d..00602988bee9 100644 --- a/drivers/ata/pata_samsung_cf.c +++ b/drivers/ata/pata_samsung_cf.c @@ -608,17 +608,15 @@ static int __exit pata_s3c_remove(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int pata_s3c_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct ata_host *host = platform_get_drvdata(pdev); + struct ata_host *host = dev_get_drvdata(dev); return ata_host_suspend(host, PMSG_SUSPEND); } static int pata_s3c_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct ata_host *host = platform_get_drvdata(pdev); - struct s3c_ide_platdata *pdata = dev_get_platdata(&pdev->dev); + struct ata_host *host = dev_get_drvdata(dev); + struct s3c_ide_platdata *pdata = dev_get_platdata(dev); struct s3c_ide_info *info = host->private_data; pata_s3c_hwinit(info, pdata); -- 2.11.0