X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fhwmon%2Ffscpos.c;h=6d0146b570201533d99b346e4aa1612c4fbcd06c;hb=ab396e91bfe953db26fa1083d9c3e7a4fbe0334a;hp=5fc77a5fed07b4b25d8fc21d27e22cc55a6a71a9;hpb=c85b2a5fe200d744a814d23c258460d4fc98a546;p=karo-tx-linux.git diff --git a/drivers/hwmon/fscpos.c b/drivers/hwmon/fscpos.c index 5fc77a5fed07..6d0146b57020 100644 --- a/drivers/hwmon/fscpos.c +++ b/drivers/hwmon/fscpos.c @@ -100,10 +100,10 @@ static void reset_fan_alarm(struct i2c_client *client, int nr); * Driver data (common to all clients) */ static struct i2c_driver fscpos_driver = { - .owner = THIS_MODULE, - .name = "fscpos", + .driver = { + .name = "fscpos", + }, .id = I2C_DRIVERID_FSCPOS, - .flags = I2C_DF_NOTIFY, .attach_adapter = fscpos_attach_adapter, .detach_client = fscpos_detach_client, }; @@ -438,7 +438,7 @@ static int fscpos_attach_adapter(struct i2c_adapter *adapter) return i2c_probe(adapter, &addr_data, fscpos_detect); } -int fscpos_detect(struct i2c_adapter *adapter, int address, int kind) +static int fscpos_detect(struct i2c_adapter *adapter, int address, int kind) { struct i2c_client *new_client; struct fscpos_data *data; @@ -453,11 +453,10 @@ int fscpos_detect(struct i2c_adapter *adapter, int address, int kind) * But it allows us to access fscpos_{read,write}_value. */ - if (!(data = kmalloc(sizeof(struct fscpos_data), GFP_KERNEL))) { + if (!(data = kzalloc(sizeof(struct fscpos_data), GFP_KERNEL))) { err = -ENOMEM; goto exit; } - memset(data, 0, sizeof(struct fscpos_data)); new_client = &data->client; i2c_set_clientdata(new_client, data);