All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: Ahmet Inan <inan@distec.de>,
	Martin Fuzzey <martin.fuzzey@flowbird.group>,
	Rob Herring <robh+dt@kernel.org>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@collabora.com,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>
Subject: Re: [PATCHv4 4/4] Input: EXC3000: Add support to query model and fw_version
Date: Thu, 6 Aug 2020 17:39:01 -0700	[thread overview]
Message-ID: <20200807003901.GQ1665100@dtor-ws> (raw)
In-Reply-To: <20200805160520.456570-5-sebastian.reichel@collabora.com>

Hi Sebastian,

On Wed, Aug 05, 2020 at 06:05:20PM +0200, Sebastian Reichel wrote:
>  
> +static int exc3000_query_interrupt(struct exc3000_data *data)
> +{
> +	u8 *buf = data->buf;
> +	int err;
> +
> +	err = i2c_master_recv(data->client, buf, EXC3000_LEN_FRAME);
> +	if (err < 0)
> +		return err;
> +
> +	if (buf[0] != 0x42)

I changed this to 'B' to match the rest of the function.

> +		return -EPROTO;
> +
> +	if (buf[4] == 'E')
> +		strlcpy(data->model, buf+5, sizeof(data->model));
> +	else if (buf[4] == 'D')
> +		strlcpy(data->fw_version, buf+5, sizeof(data->fw_version));
> +	else
> +		return -EPROTO;
> +
> +	return 0;
> +}
> +
> +	error = sysfs_create_group(&client->dev.kobj, &exc3000_attribute_group);
> +	if (error)
> +		return error;
> +
> +	error = devm_add_action_or_reset(&client->dev, exc3000_unregister_sysfs, &client->dev);
> +	if (error)
> +		return error;

Replaced 2 calls with devm_device_add_group().

Please yell if I managed to break it...

Thanks.

-- 
Dmitry

  reply	other threads:[~2020-08-07  0:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 16:05 [PATCHv4 0/4] EXC3000 Updates Sebastian Reichel
2020-08-05 16:05 ` [PATCHv4 1/4] dt-bindings: touchscreen: Convert EETI EXC3000 touchscreen to json-schema Sebastian Reichel
2020-08-06 14:49   ` Rob Herring
2020-08-07  0:36   ` Dmitry Torokhov
2020-08-05 16:05 ` [PATCHv4 2/4] Input: EXC3000: add EXC80H60 and EXC80H84 support Sebastian Reichel
2020-08-06 14:49   ` Rob Herring
2020-08-07  0:37   ` Dmitry Torokhov
2020-08-05 16:05 ` [PATCHv4 3/4] Input: EXC3000: Add reset gpio support Sebastian Reichel
2020-08-06 14:50   ` Rob Herring
2020-08-07  0:37   ` Dmitry Torokhov
2020-08-05 16:05 ` [PATCHv4 4/4] Input: EXC3000: Add support to query model and fw_version Sebastian Reichel
2020-08-07  0:39   ` Dmitry Torokhov [this message]
2020-08-13 12:20     ` Sebastian Reichel

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=20200807003901.GQ1665100@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=enric.balletbo@collabora.com \
    --cc=inan@distec.de \
    --cc=kernel@collabora.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.fuzzey@flowbird.group \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.reichel@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.