Re: [PATCH v2 1/2] drivers/mfd: Add realtek pcie card reader driver

2012-08-16 Thread Tejun Heo
On Wed, Aug 15, 2012 at 06:40:54AM +, Arnd Bergmann wrote:
> On Tuesday 14 August 2012, wei_w...@realsil.com.cn wrote:
> > +
> > +void rtsx_pci_start_run(struct rtsx_pcr *pcr)
> > +{
> > +   /* If pci device removed, don't queue idle work any more */
> > +   if (pcr->remove_pci)
> > +   return;
> > +
> > +   if (pcr->state != PDEV_STAT_RUN) {
> > +   pcr->state = PDEV_STAT_RUN;
> > +   pcr->ops->enable_auto_blink(pcr);
> > +   }
> > +
> > +   mod_timer(>idle_timer, jiffies + msecs_to_jiffies(200));
> > +}
> > +EXPORT_SYMBOL_GPL(rtsx_pci_start_run);
> 
> One more comment on the mod_timer/queue_work combination: I just saw that
> Tejun Heo posted a series to introduce a new mod_delayed_work() helper.
> 
> Once that goes in, it would be best to start using it here.

mod_delayed_work() is now in the following git branch.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git wq-mod_delayed

The branch is stable and will be pushed during for-3.7 merge window.
Please feel free to pull as necessary.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 1/2] drivers/mfd: Add realtek pcie card reader driver

2012-08-16 Thread Tejun Heo
On Wed, Aug 15, 2012 at 06:40:54AM +, Arnd Bergmann wrote:
 On Tuesday 14 August 2012, wei_w...@realsil.com.cn wrote:
  +
  +void rtsx_pci_start_run(struct rtsx_pcr *pcr)
  +{
  +   /* If pci device removed, don't queue idle work any more */
  +   if (pcr-remove_pci)
  +   return;
  +
  +   if (pcr-state != PDEV_STAT_RUN) {
  +   pcr-state = PDEV_STAT_RUN;
  +   pcr-ops-enable_auto_blink(pcr);
  +   }
  +
  +   mod_timer(pcr-idle_timer, jiffies + msecs_to_jiffies(200));
  +}
  +EXPORT_SYMBOL_GPL(rtsx_pci_start_run);
 
 One more comment on the mod_timer/queue_work combination: I just saw that
 Tejun Heo posted a series to introduce a new mod_delayed_work() helper.
 
 Once that goes in, it would be best to start using it here.

mod_delayed_work() is now in the following git branch.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git wq-mod_delayed

The branch is stable and will be pushed during for-3.7 merge window.
Please feel free to pull as necessary.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 1/2] drivers/mfd: Add realtek pcie card reader driver

2012-08-15 Thread Arnd Bergmann
On Tuesday 14 August 2012, wei_w...@realsil.com.cn wrote:
> +
> +void rtsx_pci_start_run(struct rtsx_pcr *pcr)
> +{
> +   /* If pci device removed, don't queue idle work any more */
> +   if (pcr->remove_pci)
> +   return;
> +
> +   if (pcr->state != PDEV_STAT_RUN) {
> +   pcr->state = PDEV_STAT_RUN;
> +   pcr->ops->enable_auto_blink(pcr);
> +   }
> +
> +   mod_timer(>idle_timer, jiffies + msecs_to_jiffies(200));
> +}
> +EXPORT_SYMBOL_GPL(rtsx_pci_start_run);

One more comment on the mod_timer/queue_work combination: I just saw that
Tejun Heo posted a series to introduce a new mod_delayed_work() helper.

Once that goes in, it would be best to start using it here.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 1/2] drivers/mfd: Add realtek pcie card reader driver

2012-08-15 Thread Arnd Bergmann
On Tuesday 14 August 2012, wei_w...@realsil.com.cn wrote:
 +
 +void rtsx_pci_start_run(struct rtsx_pcr *pcr)
 +{
 +   /* If pci device removed, don't queue idle work any more */
 +   if (pcr-remove_pci)
 +   return;
 +
 +   if (pcr-state != PDEV_STAT_RUN) {
 +   pcr-state = PDEV_STAT_RUN;
 +   pcr-ops-enable_auto_blink(pcr);
 +   }
 +
 +   mod_timer(pcr-idle_timer, jiffies + msecs_to_jiffies(200));
 +}
 +EXPORT_SYMBOL_GPL(rtsx_pci_start_run);

One more comment on the mod_timer/queue_work combination: I just saw that
Tejun Heo posted a series to introduce a new mod_delayed_work() helper.

Once that goes in, it would be best to start using it here.

Arnd
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/