Re: [PATCH 1/3] ASoC: Add GPIO support for jack reporting interface

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

 



On Wednesday 25 February 2009, Lopez Cruz, Misael wrote:
> +       unsigned int gpio;

Use "int" not unsigned for such might-be-a-GPIO codes ...

> +       unsigned int irq;
> +       unsigned long irqflags;
> +       irq_handler_t handler;
> +       struct work_struct work;
>  };
>  
> +#define NO_JACK_PIN_GPIO       UINT_MAX

And any negative number to flag "no GPIO";
"-EINVAL" for example.


> +               if (pins[i].gpio != NO_JACK_PIN_GPIO) {

Make that:  if (gpio_is_valid(pins[i].gpio)) ...




--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux