diff options
| author | Andrey Smirnov <[email protected]> | 2015-02-13 07:58:41 +0000 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2015-02-14 11:35:12 +0000 |
| commit | e01becbad300712a28f29b666e685536f45e83bc (patch) | |
| tree | f8190e5c7b2c2c46b84ae3e383d4671a17db958c | |
| parent | Revert "iio:humidity:si7020: fix pointer to i2c client" (diff) | |
| download | kernel-e01becbad300712a28f29b666e685536f45e83bc.tar.gz kernel-e01becbad300712a28f29b666e685536f45e83bc.zip | |
IIO: si7020: Allocate correct amount of memory in devm_iio_device_alloc
Since only a pointer to struct i2c_client is stored in a private area
of IIO device created by the driver there's no need to allocate
sizeof(struct i2c_client) worth of storage.
Pushed to stable as this is linked to the revert patch previously.
Without this followup the original patch looks sensible.
Signed-off-by: Andrey Smirnov <[email protected]>
Cc: [email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
| -rw-r--r-- | drivers/iio/humidity/si7020.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/humidity/si7020.c b/drivers/iio/humidity/si7020.c index 69e49f58a455..fa3b809aff5e 100644 --- a/drivers/iio/humidity/si7020.c +++ b/drivers/iio/humidity/si7020.c @@ -126,7 +126,7 @@ static int si7020_probe(struct i2c_client *client, /* Wait the maximum power-up time after software reset. */ msleep(15); - indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*client)); + indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); if (!indio_dev) return -ENOMEM; |
