diff mbox series

[2/2] media: tw686x: audio: Avoid non-standard macro usage

Message ID 20191108163649.32590-3-tiwai@suse.de (mailing list archive)
State New, archived
Headers show
Series media: ALSA memalloc cleanups | expand

Commit Message

Takashi Iwai Nov. 8, 2019, 4:36 p.m. UTC
Pass the device pointer from the PCI pointer directly, instead of a
non-standard macro.  The macro didn't give any better readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 drivers/media/pci/tw686x/tw686x-audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hans Verkuil Nov. 10, 2019, 10:04 a.m. UTC | #1
On 11/8/19 5:36 PM, Takashi Iwai wrote:
> Pass the device pointer from the PCI pointer directly, instead of a
> non-standard macro.  The macro didn't give any better readability.
> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>

Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Thanks!

	Hans

> ---
>  drivers/media/pci/tw686x/tw686x-audio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/pci/tw686x/tw686x-audio.c b/drivers/media/pci/tw686x/tw686x-audio.c
> index 40373bd23381..7786e51d19ae 100644
> --- a/drivers/media/pci/tw686x/tw686x-audio.c
> +++ b/drivers/media/pci/tw686x/tw686x-audio.c
> @@ -300,7 +300,7 @@ static int tw686x_snd_pcm_init(struct tw686x_dev *dev)
>  
>  	snd_pcm_lib_preallocate_pages_for_all(pcm,
>  				SNDRV_DMA_TYPE_DEV,
> -				snd_dma_pci_data(dev->pci_dev),
> +				&dev->pci_dev->dev,
>  				TW686X_AUDIO_PAGE_MAX * AUDIO_DMA_SIZE_MAX,
>  				TW686X_AUDIO_PAGE_MAX * AUDIO_DMA_SIZE_MAX);
>  	return 0;
>
diff mbox series

Patch

diff --git a/drivers/media/pci/tw686x/tw686x-audio.c b/drivers/media/pci/tw686x/tw686x-audio.c
index 40373bd23381..7786e51d19ae 100644
--- a/drivers/media/pci/tw686x/tw686x-audio.c
+++ b/drivers/media/pci/tw686x/tw686x-audio.c
@@ -300,7 +300,7 @@  static int tw686x_snd_pcm_init(struct tw686x_dev *dev)
 
 	snd_pcm_lib_preallocate_pages_for_all(pcm,
 				SNDRV_DMA_TYPE_DEV,
-				snd_dma_pci_data(dev->pci_dev),
+				&dev->pci_dev->dev,
 				TW686X_AUDIO_PAGE_MAX * AUDIO_DMA_SIZE_MAX,
 				TW686X_AUDIO_PAGE_MAX * AUDIO_DMA_SIZE_MAX);
 	return 0;