[PATCH 4/5] iio: temperature: mcp9600: Fix line exceeding 80 columns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix line exceeding 80 columns by introducing new variable "dev" and
apply it wherever possible in mcp9600_probe.

Signed-off-by: Dimitri Fedrau <dima.fedrau@xxxxxxxxx>
---
 drivers/iio/temperature/mcp9600.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/temperature/mcp9600.c b/drivers/iio/temperature/mcp9600.c
index 4003bc8c83d3..cb1c1c1c361d 100644
--- a/drivers/iio/temperature/mcp9600.c
+++ b/drivers/iio/temperature/mcp9600.c
@@ -89,19 +89,20 @@ static const struct iio_info mcp9600_info = {
 
 static int mcp9600_probe(struct i2c_client *client)
 {
+	struct device *dev = &client->dev;
 	struct iio_dev *indio_dev;
 	struct mcp9600_data *data;
 	int ret;
 
 	ret = i2c_smbus_read_byte_data(client, MCP9600_DEVICE_ID);
 	if (ret < 0)
-		return dev_err_probe(&client->dev, ret, "Failed to read device ID\n");
+		return dev_err_probe(dev, ret, "Failed to read device ID\n");
 
 	if (ret != MCP9600_DEVICE_ID_MCP9600)
-		dev_warn(&client->dev, "Expected ID %x, got %x\n",
-				MCP9600_DEVICE_ID_MCP9600, ret);
+		dev_warn(dev, "Expected ID %x, got %x\n",
+			 MCP9600_DEVICE_ID_MCP9600, ret);
 
-	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
+	indio_dev = devm_iio_device_alloc(dev, sizeof(*data));
 	if (!indio_dev)
 		return -ENOMEM;
 
@@ -114,7 +115,7 @@ static int mcp9600_probe(struct i2c_client *client)
 	indio_dev->channels = mcp9600_channels;
 	indio_dev->num_channels = ARRAY_SIZE(mcp9600_channels);
 
-	return devm_iio_device_register(&client->dev, indio_dev);
+	return devm_iio_device_register(dev, indio_dev);
 }
 
 static const struct i2c_device_id mcp9600_id[] = {
-- 
2.39.2





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux