[alsa-devel] [PATCH RESEND 1/2] ALSA SOC driver for s3c24xx with uda134x

Mark Brown broonie at sirena.org.uk
Fri Nov 14 12:03:42 CET 2008


On Thu, Nov 13, 2008 at 04:41:56PM +0100, Christian Pellegrin wrote:

This looks OK from an ASoC point of view but one small issue...

> +	s3c24xx_uda134x_l3_pins = pdev->dev.platform_data;
> +	if (s3c24xx_uda134x_l3_pins == NULL) {
> +		printk(KERN_ERR "S3C24XX_UDA134X SoC Audio: "
> +		       "unable to find platform data\n");
> +		return -ENODEV;
> +	}
> +	s3c24xx_uda134x.power = s3c24xx_uda134x_l3_pins->power;
> +	s3c24xx_uda134x.model = s3c24xx_uda134x_l3_pins->model;
> +	gpio_direction_output(s3c24xx_uda134x_l3_pins->l3_data, 0);
> +	gpio_direction_output(s3c24xx_uda134x_l3_pins->l3_clk, 0);
> +	gpio_direction_output(s3c24xx_uda134x_l3_pins->l3_mode, 0);

You should request the GPIOs with gpio_request() before using them (and
then free them with gpio_free() when the driver exits).


More information about the Alsa-devel mailing list