Re: [PATCH 5/6] Input: ucb1400_ts - convert to threaded IRQ

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

 



Hi Daniel,

On Wed, Nov 16, 2011 at 03:36:37PM +0800, Daniel Kurtz wrote:
`> Hi Dmitry,
> 
> On Mon, Nov 14, 2011 at 4:36 PM, Dmitry Torokhov
> <dmitry.torokhov@xxxxxxxxx> wrote:
> >
> >  #ifdef CONFIG_PM_SLEEP
> > +static int ucb1400_ts_suspend(struct device *dev)
> > +{
> > +       struct ucb1400_ts *ucb = dev->platform_data;
> > +       struct input_dev *idev = ucb->ts_idev;
> > +
> > +       mutex_lock(&idev->mutex);
> > +
> > +       if (idev->users)
> > +               ucb1400_ts_start(ucb);
> > +
> > +       mutex_unlock(&idev->mutex);
> > +       return 0;
> > +}
> > +
> >  static int ucb1400_ts_resume(struct device *dev)
> >  {
> >        struct ucb1400_ts *ucb = dev->platform_data;
> > +       struct input_dev *idev = ucb->ts_idev;
> >
> > -       if (ucb->ts_task) {
> > -               /*
> > -                * Restart the TS thread to ensure the
> > -                * TS interrupt mode is set up again
> > -                * after sleep.
> > -                */
> > -               ucb->ts_restart = 1;
> > -               wake_up(&ucb->ts_wait);
> > -       }
> > +       mutex_lock(&idev->mutex);
> > +
> > +       if (idev->users)
> > +               ucb1400_ts_stop(ucb);
> > +
> > +       mutex_unlock(&idev->mutex);
> >        return 0;
> >  }
> >  #endif
> 
> Do you need an #else here to set *_suspend/resume to NULL when
> CONFIG_PM_SLEEP is not defined?
> It seems to have gotten lost somewhere.

Without CONFIG_PM_SLEEP SIMPLE_DEV_PM_OPS simply ignores its 2nd and 3rd
arguments so the fact that they are missing does not matter.

Thanks.

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


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux