Commit 3daf94b3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

I2C: sparse cleanups for a few i2c drivers.

parent 849d9e0a
......@@ -143,7 +143,7 @@ static int pcf_isa_init(void)
}
}
if (irq > 0) {
if (request_irq(irq, pcf_isa_handler, 0, "PCF8584", 0) < 0) {
if (request_irq(irq, pcf_isa_handler, 0, "PCF8584", NULL) < 0) {
printk(KERN_ERR "i2c-elektor: Request irq%d failed\n", irq);
irq = 0;
} else
......@@ -244,7 +244,7 @@ static int __init i2c_pcfisa_init(void)
fail:
if (irq > 0) {
disable_irq(irq);
free_irq(irq, 0);
free_irq(irq, NULL);
}
if (!mmapped)
......@@ -258,7 +258,7 @@ static void i2c_pcfisa_exit(void)
if (irq > 0) {
disable_irq(irq);
free_irq(irq, 0);
free_irq(irq, NULL);
}
if (!mmapped)
......
......@@ -101,10 +101,6 @@ static int adm1031_attach_adapter(struct i2c_adapter *adapter);
static int adm1031_detect(struct i2c_adapter *adapter, int address, int kind);
static void adm1031_init_client(struct i2c_client *client);
static int adm1031_detach_client(struct i2c_client *client);
static inline u8 adm1031_read_value(struct i2c_client *client, u8 reg);
static inline int
adm1031_write_value(struct i2c_client *client, u8 reg, unsigned int value);
static struct adm1031_data *adm1031_update_device(struct device *dev);
/* This is the driver that will be inserted */
......@@ -116,7 +112,19 @@ static struct i2c_driver adm1031_driver = {
.detach_client = adm1031_detach_client,
};
static int adm1031_id = 0;
static int adm1031_id;
static inline u8 adm1031_read_value(struct i2c_client *client, u8 reg)
{
return i2c_smbus_read_byte_data(client, reg);
}
static inline int
adm1031_write_value(struct i2c_client *client, u8 reg, unsigned int value)
{
return i2c_smbus_write_byte_data(client, reg, value);
}
#define TEMP_TO_REG(val) (((val) < 0 ? ((val - 500) / 1000) : \
((val + 500) / 1000)))
......@@ -849,17 +857,6 @@ static int adm1031_detach_client(struct i2c_client *client)
return 0;
}
static inline u8 adm1031_read_value(struct i2c_client *client, u8 reg)
{
return i2c_smbus_read_byte_data(client, reg);
}
static inline int
adm1031_write_value(struct i2c_client *client, u8 reg, unsigned int value)
{
return i2c_smbus_write_byte_data(client, reg, value);
}
static void adm1031_init_client(struct i2c_client *client)
{
unsigned int read_val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment