> +#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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to