X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fhwmon%2Fit87.c;h=53cc2b6d63854a835e661a0b2921640b6e36e915;hb=736c7b808f38f3bb72941345e11e236ec65dec3d;hp=0a8d795f15c2e242653dc160beb9102a2430384b;hpb=5071860aba7fc69279ab822638ed2c2e4549f9fd;p=linux-2.6 diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 0a8d795f15..53cc2b6d63 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -37,10 +37,9 @@ #include #include #include -#include -#include -#include #include +#include +#include #include #include @@ -51,7 +50,7 @@ static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, static unsigned short isa_address = 0x290; /* Insmod parameters */ -SENSORS_INSMOD_2(it87, it8712); +I2C_CLIENT_INSMOD_2(it87, it8712); #define REG 0x2e /* The register to read/write */ #define DEV 0x07 /* Register: Logical device select */ @@ -698,7 +697,7 @@ static int it87_attach_adapter(struct i2c_adapter *adapter) { if (!(adapter->class & I2C_CLASS_HWMON)) return 0; - return i2c_detect(adapter, &addr_data, it87_detect); + return i2c_probe(adapter, &addr_data, it87_detect); } static int it87_isa_attach_adapter(struct i2c_adapter *adapter) @@ -707,7 +706,7 @@ static int it87_isa_attach_adapter(struct i2c_adapter *adapter) } /* SuperIO detection - will change isa_address if a chip is found */ -static int it87_find(int *address) +static int __init it87_find(int *address) { int err = -ENODEV; @@ -738,7 +737,7 @@ exit: return err; } -/* This function is called by i2c_detect */ +/* This function is called by i2c_probe */ int it87_detect(struct i2c_adapter *adapter, int address, int kind) { int i; @@ -920,7 +919,7 @@ int it87_detect(struct i2c_adapter *adapter, int address, int kind) } if (data->type == it8712) { - data->vrm = i2c_which_vrm(); + data->vrm = vid_which_vrm(); device_create_file_vrm(new_client); device_create_file_vid(new_client); } @@ -945,11 +944,8 @@ static int it87_detach_client(struct i2c_client *client) hwmon_device_unregister(data->class_dev); - if ((err = i2c_detach_client(client))) { - dev_err(&client->dev, - "Client deregistration failed, client not detached.\n"); + if ((err = i2c_detach_client(client))) return err; - } if(i2c_is_isa_client(client)) release_region(client->addr, IT87_EXTENT);