Linux IIO development
 help / color / mirror / Atom feed
From: Dimitri Fedrau <dima.fedrau@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Dimitri Fedrau <dima.fedrau@gmail.com>,
	Andrew Hepp <andrew.hepp@ahepp.dev>,
	Marcelo Schmitt <marcelo.schmitt1@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] iio: temperature: mcp9600: Fix line exceeding 80 columns
Date: Tue, 30 Apr 2024 14:05:34 +0200	[thread overview]
Message-ID: <20240430120535.46097-5-dima.fedrau@gmail.com> (raw)
In-Reply-To: <20240430120535.46097-1-dima.fedrau@gmail.com>

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@gmail.com>
---
 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


  parent reply	other threads:[~2024-04-30 12:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 12:05 [PATCH 0/5] Add threshold events support and some minor cleanup Dimitri Fedrau
2024-04-30 12:05 ` [PATCH 1/5] iio: temperature: mcp9600: set channel2 member Dimitri Fedrau
2024-04-30 12:11   ` Jonathan Cameron
2024-04-30 12:21     ` Dimitri Fedrau
2024-05-05 10:15       ` Jonathan Cameron
2024-05-09 19:31         ` Dimitri Fedrau
2024-04-30 12:05 ` [PATCH 2/5] iio: temperature: mcp9600: Share scale by all channels Dimitri Fedrau
2024-04-30 12:09   ` Jonathan Cameron
2024-04-30 12:23     ` Dimitri Fedrau
2024-04-30 12:05 ` [PATCH 3/5] iio: temperature: mcp9600: add newlines after if statements Dimitri Fedrau
2024-04-30 12:05 ` Dimitri Fedrau [this message]
2024-04-30 12:05 ` [PATCH 5/5] iio: temperature: mcp9600: add threshold events support Dimitri Fedrau
2024-04-30 20:41   ` kernel test robot
2024-05-05 17:47   ` Jonathan Cameron
2024-05-09 20:45     ` Dimitri Fedrau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240430120535.46097-5-dima.fedrau@gmail.com \
    --to=dima.fedrau@gmail.com \
    --cc=andrew.hepp@ahepp.dev \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt1@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox