-static int w83791d_create_subclient(struct i2c_adapter *adapter,
- struct i2c_client *client, int addr,
- struct i2c_client **sub_cli)
-{
- int err;
- struct i2c_client *sub_client;
-
- (*sub_cli) = sub_client =
- kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
- if (!(sub_client)) {
- return -ENOMEM;
- }
- sub_client->addr = 0x48 + addr;
- i2c_set_clientdata(sub_client, NULL);
- sub_client->adapter = adapter;
- sub_client->driver = &w83791d_driver;
- strlcpy(sub_client->name, "w83791d subclient", I2C_NAME_SIZE);
- if ((err = i2c_attach_client(sub_client))) {
- dev_err(&client->dev, "subclient registration "
- "at address 0x%x failed\n", sub_client->addr);
- kfree(sub_client);
- return err;
- }
- return 0;
-}
-
-
-static int w83791d_detect_subclients(struct i2c_adapter *adapter, int address,
- int kind, struct i2c_client *client)