diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-highlander.c')
| -rw-r--r-- | drivers/i2c/busses/i2c-highlander.c | 30 | 
1 files changed, 7 insertions, 23 deletions
diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c index 3df1bc80f37..512fcfabc18 100644 --- a/drivers/i2c/busses/i2c-highlander.c +++ b/drivers/i2c/busses/i2c-highlander.c @@ -12,7 +12,6 @@   * of this archive for more details.   */  #include <linux/module.h> -#include <linux/init.h>  #include <linux/interrupt.h>  #include <linux/i2c.h>  #include <linux/platform_device.h> @@ -52,7 +51,7 @@ struct highlander_i2c_dev {  	size_t			buf_len;  }; -static int iic_force_poll, iic_force_normal; +static bool iic_force_poll, iic_force_normal;  static int iic_timeout = 1000, iic_read_delay;  static inline void highlander_i2c_irq_enable(struct highlander_i2c_dev *dev) @@ -227,7 +226,7 @@ static int highlander_i2c_read(struct highlander_i2c_dev *dev)  	/*  	 * The R0P7780LC0011RL FPGA needs a significant delay between -	 * data read cycles, otherwise the transciever gets confused and +	 * data read cycles, otherwise the transceiver gets confused and  	 * garbage is returned when the read is subsequently aborted.  	 *  	 * It is not sufficient to wait for BBSY. @@ -356,7 +355,7 @@ static const struct i2c_algorithm highlander_i2c_algo = {  	.functionality	= highlander_i2c_func,  }; -static int __devinit highlander_i2c_probe(struct platform_device *pdev) +static int highlander_i2c_probe(struct platform_device *pdev)  {  	struct highlander_i2c_dev *dev;  	struct i2c_adapter *adap; @@ -387,7 +386,7 @@ static int __devinit highlander_i2c_probe(struct platform_device *pdev)  		dev->irq = 0;  	if (dev->irq) { -		ret = request_irq(dev->irq, highlander_i2c_irq, IRQF_DISABLED, +		ret = request_irq(dev->irq, highlander_i2c_irq, 0,  				  pdev->name, dev);  		if (unlikely(ret))  			goto err_unmap; @@ -436,12 +435,10 @@ err_unmap:  err:  	kfree(dev); -	platform_set_drvdata(pdev, NULL); -  	return ret;  } -static int __devexit highlander_i2c_remove(struct platform_device *pdev) +static int highlander_i2c_remove(struct platform_device *pdev)  {  	struct highlander_i2c_dev *dev = platform_get_drvdata(pdev); @@ -453,8 +450,6 @@ static int __devexit highlander_i2c_remove(struct platform_device *pdev)  	iounmap(dev->base);  	kfree(dev); -	platform_set_drvdata(pdev, NULL); -  	return 0;  } @@ -465,21 +460,10 @@ static struct platform_driver highlander_i2c_driver = {  	},  	.probe		= highlander_i2c_probe, -	.remove		= __devexit_p(highlander_i2c_remove), +	.remove		= highlander_i2c_remove,  }; -static int __init highlander_i2c_init(void) -{ -	return platform_driver_register(&highlander_i2c_driver); -} - -static void __exit highlander_i2c_exit(void) -{ -	platform_driver_unregister(&highlander_i2c_driver); -} - -module_init(highlander_i2c_init); -module_exit(highlander_i2c_exit); +module_platform_driver(highlander_i2c_driver);  MODULE_AUTHOR("Paul Mundt");  MODULE_DESCRIPTION("Renesas Highlander FPGA I2C/SMBus adapter");  | 
