si7020.c (e765537add38cf7967efa11999bb5daf84a6517d) | si7020.c (e01becbad300712a28f29b666e685536f45e83bc) |
---|---|
1/* 2 * si7020.c - Silicon Labs Si7013/20/21 Relative Humidity and Temp Sensors 3 * Copyright (c) 2013,2014 Uplogix, Inc. 4 * David Barksdale <dbarksdale@uplogix.com> 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms and conditions of the GNU General Public License, 8 * version 2, as published by the Free Software Foundation. --- 112 unchanged lines hidden (view full) --- 121 122 /* Reset device, loads default settings. */ 123 ret = i2c_smbus_write_byte(client, SI7020CMD_RESET); 124 if (ret < 0) 125 return ret; 126 /* Wait the maximum power-up time after software reset. */ 127 msleep(15); 128 | 1/* 2 * si7020.c - Silicon Labs Si7013/20/21 Relative Humidity and Temp Sensors 3 * Copyright (c) 2013,2014 Uplogix, Inc. 4 * David Barksdale <dbarksdale@uplogix.com> 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms and conditions of the GNU General Public License, 8 * version 2, as published by the Free Software Foundation. --- 112 unchanged lines hidden (view full) --- 121 122 /* Reset device, loads default settings. */ 123 ret = i2c_smbus_write_byte(client, SI7020CMD_RESET); 124 if (ret < 0) 125 return ret; 126 /* Wait the maximum power-up time after software reset. */ 127 msleep(15); 128 |
129 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*client)); | 129 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); |
130 if (!indio_dev) 131 return -ENOMEM; 132 133 data = iio_priv(indio_dev); 134 *data = client; 135 136 indio_dev->dev.parent = &client->dev; 137 indio_dev->name = dev_name(&client->dev); --- 24 unchanged lines hidden --- | 130 if (!indio_dev) 131 return -ENOMEM; 132 133 data = iio_priv(indio_dev); 134 *data = client; 135 136 indio_dev->dev.parent = &client->dev; 137 indio_dev->name = dev_name(&client->dev); --- 24 unchanged lines hidden --- |