Re: [PATCH] mrst_touchscreen: clean up input side

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

 



On Wed, Jun 30, 2010 at 06:31:58PM +0100, Alan Cox wrote:
> 
> Still staging stuff but knocked out some of the problems.
> 
> 
> Fix most of the stuff that Dmitry pointed out. This leaves the mutex in IRQ
> and misuse of SPI to sort out.
> 

Looks better, thanks for making the changes. I wonder if switching to
threaded IRQ willnot fix all this ugliness in pendetect implementation.

>  static int mrstouch_remove(struct spi_device *spi)

__devexit

>  {
> -	mrstouch_debug("%s", __func__);
>  	free_irq(mrstouchdevp->irq, mrstouchdevp);
> -	input_unregister_device(mrstouchdevp->input);
> -	input_free_device(mrstouchdevp->input);
>  	if (mrstouchdevp->pendet_thrd)
>  		kthread_stop(mrstouchdevp->pendet_thrd);
> +	input_unregister_device(mrstouchdevp->input);
>  	kfree(mrstouchdevp);
>  	return 0;
>  }
> @@ -830,8 +776,6 @@ static struct spi_driver mrstouch_driver = {
>  		.owner  = THIS_MODULE,
>  	},
>  	.probe          = mrstouch_probe,
> -	.suspend        = mrstouch_suspend,
> -	.resume         = mrstouch_resume,
>  	.remove         = mrstouch_remove,

__devexot_p()

>  };
>  
> @@ -839,11 +783,10 @@ static int __init mrstouch_module_init(void)
>  {
>  	int err;
>  
> -	mrstouch_debug("%s", __func__);
>  	err = spi_register_driver(&mrstouch_driver);
>  	if (err) {
> -		mrstouch_debug("%s(%d)", "SPI PENDET failed", err);
> -		return -1;
> +		printk(KERN_ERR "%s(%d)", "SPI PENDET failed", err);
> +		return err;;


Extra semicolon... But I'd just do:

	return spi_register_driver(&mrstouch_driver);

>  	}
>  
>  	return 0;
> @@ -851,7 +794,6 @@ static int __init mrstouch_module_init(void)
>  
>  static void __exit mrstouch_module_exit(void)
>  {
> -	mrstouch_debug("%s", __func__);
>  	spi_unregister_driver(&mrstouch_driver);
>  	return;

Zap this return 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