Received: by 10.192.165.148 with SMTP id m20csp414059imm; Fri, 20 Apr 2018 01:09:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx48mPwXR3AjZGq4UVFqbg4WqQrnUYPUscS3boHCHzxZIyApRAFeurDafqKLn6LVboBxzB/Sa X-Received: by 10.98.137.218 with SMTP id n87mr8842030pfk.48.1524211772828; Fri, 20 Apr 2018 01:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524211772; cv=none; d=google.com; s=arc-20160816; b=v2mtcZtPVBzwtyo4fEqi7Y9JmmdAWag1FjDZvN5hX1hwqCkS5lIE/JgYV3gIInP4lo db0jrXDdrORFavLv2AXGzBokznKbo+7ZW7as//DHpukKXeRRHADs9xMXltmkU8uAfLoS VfiXHpgudVWVMq3UEQfaGv/2Iw4H3vom9WxB95xbxCdGVnY0xOzvS25QBo5E9ZCm1mOo ekBTKsDvmxFtIkdqyNXFOZQIFWcPpJ603PNbpE5OC5xecHrZ4stbPLUV5bscGWNOoKps 9D9Xadgc9CrVZA5jos9DInd6tLWSK2uAMI1zQNehkcxfgt2+rsmyUbHwkci/2afr0RpL u5CQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=r5S9x+KNWPYyKCynxx8VfcbKCPlUgV22FqIqqD9Wzp0=; b=Apr0EPQ2/szLI2G5kY4ADLEyOvBjPR8W7xjxGgBW/xIJh9j3V66NtCzUzYhLuWgXxu anngKet28E4iPzmk5MXyBrXngd8dfPAipI6VDf/Qf4ZC2gIiBg1FYX1Lkaq9wCsfQhRP 1UEqhvZQpHhzYaQuPmcgFwIQNtH+jK+8lu3uTRAZGgPopQkvcyttFOQdin5UNOQrJTDn ciwlnxGORIgTg4EwUtGqR1qiZt3ZZNNk6SwIBJgUKB33zgHa4BdIcT2BEMcllSD/rd42 AFJ9Ya/yd/g4vFEYP9FBEmkiYfQv06iTMw2yco6viZ9qYSGOy0Vyu/N0OYrfr4/nb6wk 2fAQ== 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 f1-v6si5079993plt.298.2018.04.20.01.09.18; Fri, 20 Apr 2018 01:09:32 -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 S1754505AbeDTIHq (ORCPT + 99 others); Fri, 20 Apr 2018 04:07:46 -0400 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:53431 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754387AbeDTIHk (ORCPT ); Fri, 20 Apr 2018 04:07:40 -0400 X-IronPort-AV: E=Sophos;i="5.49,469,1520924400"; d="scan'208";a="10756483" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Apr 2018 01:07:39 -0700 Received: from [10.159.245.112] (10.10.76.4) by chn-sv-exch07.mchp-main.com (10.10.76.108) with Microsoft SMTP Server id 14.3.352.0; Fri, 20 Apr 2018 01:07:38 -0700 Subject: Re: [PATCH 61/61] ASoC: atmel: simplify getting .drvdata To: Wolfram Sang , CC: , , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Alexandre Belloni , , References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> <20180419140641.27926-62-wsa+renesas@sang-engineering.com> From: Nicolas Ferre Organization: microchip Message-ID: <23044c16-efbf-7920-2a25-338ad46376eb@microchip.com> Date: Fri, 20 Apr 2018 10:06:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180419140641.27926-62-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/04/2018 at 16:06, 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 Acked-by: Nicolas Ferre > --- > > 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); > -- Nicolas Ferre