Re: [PATCH 06/11] add the generic file

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

 



> +#ifdef CONFIG_PM
> +/* Is the card working now ? */
> +static inline int is_working(struct poseidon *pd)
> +{
> +	if (pd->state & POSEIDON_STATE_IDLE_HIBERANTION)
> +		return 0;
> +	return pd->interface->pm_usage_cnt > 0;
> +}
> +
> +static int poseidon_suspend(struct usb_interface *intf, pm_message_t msg)
> +{
> +	struct poseidon *pd = usb_get_intfdata(intf);
> +
> +	if (!is_working(pd)) {
> +		if (pd->interface->pm_usage_cnt <= 0
>   
`interface->pm_usage_cnt` has been changed to atomic_t type in the latest code. 

> +			&& !in_hibernation(pd)) {
> +			pd->msg.event = PM_EVENT_AUTO_SUSPEND;
> +			pd->pm_resume = NULL; /*  a good guard */
> +			printk(KERN_DEBUG "\n\t ++ TLG2300 auto suspend ++\n");
> +		}
> +		return 0;
> +	}
> +	pd->msg = msg;
>   

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

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux