Re: [PATCH] ARM: OMAP: Add support for dynamic GPIO switch update

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

 



Hi,

one comment below

On Mon, Dec 15, 2008 at 02:08:16PM +0200, ext Jani Nikula wrote:
> +int omap_update_gpio_switch(const struct omap_gpio_switch *cfg)
> +{
> +	unsigned long flags;
> +	struct gpio_switch *sw = find_switch(cfg->gpio, cfg->name);
> +
> +	if (!sw)
> +		return -EINVAL;
> +
> +	spin_lock_irqsave(&sw->lock, flags);
> +	sw->debounce_rising = cfg->debounce_rising;
> +	sw->debounce_falling = cfg->debounce_falling;
> +	sw->notify = cfg->notify;
> +	sw->notify_data = cfg->notify_data;
> +	spin_unlock_irqrestore(&sw->lock, flags);
> +
> +	return 0;
> +}
> +EXPORT_SYMBOL(omap_update_gpio_switch);

how about you only change what's not null ?? then you could only change
the notify callback and keep the same debounce_rising/falling ??

-- 
balbi
--
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