Re: [PATCH 5/7] S3C AUDIO: Add header to pass platform data to device drivers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 05, 2009 at 10:35:00AM +0900, Jassi Brar wrote:

> +/**
> + * struct s3c_audio_pdata - common platform data for audio device drivers
> + * @pdata: Pointer to protocol(I2S, PCM or AC97) specific platform data
> + * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode
> + */
> +struct s3c_audio_pdata {
> +	void *pdata;
> +
> +	int (*cfg_gpio)(struct platform_device *);
> +};

I don't see much benefit in this structure with the pdata embedded in it
- you just end up with an additional layer of indirection in your
platform data if you need to add device specific stuff which is annoying
to specify in machine drivers.

I'd just embed the GPIO configuration callback in a driver-specific
platform data.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux