From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753028AbbKQKVL (ORCPT ); Tue, 17 Nov 2015 05:21:11 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:53939 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751363AbbKQKVH (ORCPT ); Tue, 17 Nov 2015 05:21:07 -0500 From: Arnd Bergmann To: Krzysztof Kozlowski Cc: Mark Brown , alsa-devel@alsa-project.org, Liam Girdwood , Heiko Stuebner , Kukjin Kim , Sangbeom Kim , linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vinod Koul , Ben Dooks Subject: Re: [PATCH 2/3] ASoC: s3c24xx-i2s: pass DMA channels as platform data Date: Tue, 17 Nov 2015 11:19:51 +0100 Message-ID: <5663555.neFjt3nUNJ@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <564A84AE.2000502@samsung.com> References: <5466463.9HBcuLFGQf@wuerfel> <4171669.Y8FyLG5WLL@wuerfel> <564A84AE.2000502@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:hnKndmw3vqUNdR8B8QRsvpHNffJ7A91U7PmDqOECbSLzPQimNOx kiQ1Thk4yJyCu05JB2hw3uYuthNn1+6wDNuPud7vdM/YxtlnCo5TuUDwSEQ5I4hENuTXbkV /kfVtzwNQt6xiM++u8mu65QVSOUsHpp6tUKds8IRKlezhXXKwb236bqZs7t3ZNjxQR1opAy QJPYpsJdro/hGx+zTdsqA== X-UI-Out-Filterresults: notjunk:1;V01:K0:tLgyYALuiSA=:1QcYmPso7xoA7yVXYkWBZ8 RuNAlCL0Sy/qRD9nqFz/x7bGJTxeRRbrv7/TiRlXNtOfXd+995iWsr3Gcp5uIOeQOPWo2rX3S XO+47gGxAT3uq3Hqno7tR1HqvlBziv0s7MzuI61j/ummSZsyD5mWiGy+gw0FEzQg6WFDHFgCV mnqDqcgGjFqL4eOLsHyALzzgC+j4QLzx1pY2FAhCUHsdWomuAqHSKxqch46wxDawEayB3nsRh Z4WWCxkwp+Gg9F5bVKgcvYsCV3KRgAV08fHP9OP0OlbK5oDO/06s+9EtxZRdZzJxKo11n9fD5 quosIIBaE+qOOy8nnEimDSzOGiDCVrhKKAirDQHbNTQ5Yd9onQX4Dk2FIzNH9ngfSy9AScT0b renpfxH6v06gmIpolNWRR8SlJBM82QdHLNFIzUBFtnFJD/45MeUYDxfqoNTKdOL5eVqz0xl1F B5uWuZvWqb24jeo2RSrp5JbwbK8nGthGnjlXMLznO37Qt0gws2igxBESPRfzP7NYiJslT1lSC GPqy4IRAXhKKrq/qUYfRVhtydN1vYn29EyLyYPqP28voLd4OPbopKzhRKDbbvvtyGO+KqXQot 64pjacPDCRQyakIbtz0GinQtd7/fEPQHRuy9tv+uKaiSP3OLYFeqxGck4Y5JxCPzjNy8+alAF zgqPO59GlBIKybG8RcbqPAluvkv+GUaL6MLIAdSG0jqF/qAq9KD5fC9qMRAkPr6bkgElV0nNE xi2x7Ykjm+XNUWPb Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 17 November 2015 10:36:46 Krzysztof Kozlowski wrote: > On 14.11.2015 02:23, Arnd Bergmann wrote: > > This is a minor cleanup to make the s3c2412-i2s and s3c24xx-i2s > > drivers independent of the mach/dma.h header file and to allow > > removing the dependency on the specific dmaengine driver in the > > next patch. > > > > As a side not, only the s3c24xx-i2s driver seems to still be > > used, while the definition of the s3c2412-i2s platform device was > > removed in commit 6d259a25b56d ("ARM: SAMSUNG: use static > > declaration when it is not used in other files") after it had > > never been referenced since its introduction in f0fba2ad1b6b > > ("ASoC: multi-component - ASoC Multi-Component Support"). > > > > Apparently it should have been used by mach-jive.c, but that > > never happened. My patch at this point leaves the current state > > unchanged, we can decide whether to fix or delete the jive > > driver and s3c2412-i2s another time. > > > > Signed-off-by: Arnd Bergmann > > > > diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c > > index 3ce234f4c872..e5e91669dd2b 100644 > > --- a/arch/arm/plat-samsung/devs.c > > +++ b/arch/arm/plat-samsung/devs.c > > @@ -571,6 +571,11 @@ static struct resource s3c_iis_resource[] = { > > [0] = DEFINE_RES_MEM(S3C24XX_PA_IIS, S3C24XX_SZ_IIS), > > }; > > > > +static struct s3c_audio_pdata s3c_iis_platdata = { > > + .dma_playback = (void *)DMACH_I2S_OUT, > > + .dma_capture = (void *)DMACH_I2S_IN, > > Why casting? Is it needed? s3c64xx uses strings here, but s3c24xx uses integer indexes into an array. I thought about changing the indexes to direct pointers to entries in the array, but decided to leave that for another day. > > @@ -454,6 +454,7 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev) > > { > > int ret = 0; > > struct resource *res; > > + struct s3c_audio_pdata *pdata = dev_get_platdata(&pdev->dev); > > Maybe: > if (!pdata) { > pr_err("bla bla bla"); > return -EINVAL; > } Yes, that might be helpful in case there are any out of tree users, or I missed one of the in-tree users. Arnd