3 Dec
2013
3 Dec
'13
10:59 a.m.
[...]
+void ux500_msp_populate_dai_drv(struct snd_soc_dai_driver *ux500_msp_dai_drv) +{
- ux500_msp_dai_drv->probe = ux500_msp_dai_probe;
- ux500_msp_dai_drv->suspend = NULL;
- ux500_msp_dai_drv->resume = NULL;
- ux500_msp_dai_drv->playback.channels_min = UX500_MSP_MIN_CHANNELS;
- ux500_msp_dai_drv->playback.channels_max = UX500_MSP_MAX_CHANNELS;
- ux500_msp_dai_drv->playback.rates = UX500_I2S_RATES;
- ux500_msp_dai_drv->playback.formats = UX500_I2S_FORMATS;
- ux500_msp_dai_drv->capture.channels_min = UX500_MSP_MIN_CHANNELS;
- ux500_msp_dai_drv->capture.channels_max = UX500_MSP_MAX_CHANNELS;
- ux500_msp_dai_drv->capture.rates = UX500_I2S_RATES;
- ux500_msp_dai_drv->capture.formats = UX500_I2S_FORMATS;
- ux500_msp_dai_drv->ops = ux500_msp_dai_ops;
};
You can just use the same static driver for all devices. No need to dynamically allocate it.
How do you mean? Just create a 'static struct' instead?
Yes.
static struct snd_soc_dai_driver ux500_msp_dai_driver = { ... };
Yes, that's no issue. I was more focused on the reduction of code than anything else, but that is a better idea.
I'll resubmit.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog