Received: by 10.192.165.156 with SMTP id m28csp760397imm; Thu, 19 Apr 2018 07:09:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+D0SMLB34Lx3llr2SwwsEe9RyZJA+7anPe5P7V6+tuV34lN1hMtc19IM5ANMti/aKbPWXV X-Received: by 2002:a17:902:5785:: with SMTP id l5-v6mr6135470pli.379.1524146986287; Thu, 19 Apr 2018 07:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146986; cv=none; d=google.com; s=arc-20160816; b=HAljqJjcjqixKLxkIC0sTWGFr299x7Y82ipbmWwEofUOog6omS/xaHMH58IawsLC/C WAd/eJNNP8AmFN3nwq/HkCpv8xMvcZklsCpc418ESKCv6SZMU254nowZOTK6pe2ytxw6 aEjC0UNAxgqxDQ6Mt15B7vPF4n2Q7iB9y0B5R0Yy5wJDgkf+W7mbXaAoisHsmY2COxx5 itLFmiakMumqlDYHBJKcKnhRFIpXbBrC0RwKx2fnS/lwLAl6yJfcS8JO1ECrDHr7LTpq aCqcfaESzKxXUfmnox2HLaMi8C6GHEXGwHyMkt/OJkackzuOnOU290Cyg/sJdIIKzqym anvw== 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=/RGOYtMC0RSCev/wlCguIDpVCzqkQNkv0OJVpCsMD5U=; b=YeEDa2++BLw8ZQWLPbl1DHoEfVv3sLvEptHxMdXIKfhkv2M+41fLDNiqGkDkNIPafQ LVDaVWgMvOmohURI0y45bGAqH2CGEGt7TrSd3i2oIzKRNOoyDNm0XMSSUKF2lbsb9k1f gjJ1Y5e3FHA6S4IJp0WOoUTFtFl0gGSqHnXZBFqa2oQhHKtazZf0hnNw4ltc/nzUsYGR /0LTJukDU3MuR56W5PvozcpkpdorDzsG0Co7EVrpe2xXp3UzrkFlxNfKqSqjlhKx9v+o sdj+0LKlFbihnU2tD+07SaNqtWYfraXODqODPhMYtdAVywyHuguEtnVo8wTJ2a3CZCVB T1zA== 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 d68si2995149pgc.137.2018.04.19.07.09.23; Thu, 19 Apr 2018 07:09:46 -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 S1753651AbeDSOHr (ORCPT + 99 others); Thu, 19 Apr 2018 10:07:47 -0400 Received: from sauhun.de ([88.99.104.3]:45342 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753577AbeDSOHR (ORCPT ); Thu, 19 Apr 2018 10:07:17 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id F0A183139E1; Thu, 19 Apr 2018 16:07:15 +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 , Nicolas Ferre , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Alexandre Belloni , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 61/61] ASoC: atmel: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:31 +0200 Message-Id: <20180419140641.27926-62-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. sound/soc/atmel/atmel_ssc_dai.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index a1e2c5682dcd..4a0275a6505d 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c @@ -1002,8 +1002,7 @@ static const struct snd_soc_component_driver atmel_ssc_component = { static int asoc_ssc_init(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct ssc_device *ssc = platform_get_drvdata(pdev); + struct ssc_device *ssc = dev_get_drvdata(dev); int ret; ret = snd_soc_register_component(dev, &atmel_ssc_component, @@ -1033,8 +1032,7 @@ static int asoc_ssc_init(struct device *dev) static void asoc_ssc_exit(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct ssc_device *ssc = platform_get_drvdata(pdev); + struct ssc_device *ssc = dev_get_drvdata(dev); if (ssc->pdata->use_dma) atmel_pcm_dma_platform_unregister(dev); -- 2.11.0