Re: [patch 08/14] input: PCAP2 based touchscreen driver

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

 



On Fri, Nov 21, 2008 at 05:04:11PM +0100, stefan@xxxxxxxxxxxxxxxxxx wrote:
> Touchscreen driver based on the PCAP2 multi function device.
> 
> Signed-off-by: Daniel Ribeiro <drwyrm@xxxxxxxxx>
> 
> +
> +static int __devexit pcap_ts_remove(struct platform_device *pdev)
> +{
> +	ezx_pcap_unregister_event(PCAP_IRQ_TS);
> +
> +	del_timer_sync(&pcap_ts->timer);
> +
> +	input_unregister_device(pcap_ts->input);
> +	kfree(pcap_ts);
> +

Could pcap_ts->work be still running at this point?

> +	return 0;
> +}
> +
> +}
> +#else
> +
> +#define pcap_ts_suspend NULL
> +#define pcap_ts_resume  NULL
> +
> +#endif
> +
> +static struct platform_driver pcap_ts_driver = {
> +	.probe		= pcap_ts_probe,
> +	.remove		= __devexit_p(pcap_ts_remove),
> +	.suspend	= pcap_ts_suspend,
> +	.resume		= pcap_ts_resume,

I think it is preferred that .suspend and .resume assigments are
guarded by #ifdef CONFIG_PM, not creating NULL stubs as this will
(theoretically) allow removing .suspend and .resume pointers from
driver stucture when compiling without PM support.

Also try running through checkpatch.pl - there are a few warnings I'd
like to be fixed as well. Otherwise looks pretty good.

Oh, and you need to add your sign-off please. 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