From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: Driver for Maxim MAX31790
Date: Wed, 26 Aug 2015 04:15:48 +0000 [thread overview]
Message-ID: <55DD3D74.7000203@roeck-us.net> (raw)
In-Reply-To: <1438195783-26978-1-git-send-email-corone.il.han@gmail.com>
On 08/25/2015 08:49 PM, Il Han wrote:
> 2015-08-25 23:52 GMT+09:00 Guenter Roeck <linux@roeck-us.net <mailto:linux@roeck-us.net>>:
>
> On 08/24/2015 10:52 PM, Il Han wrote:
>
> The driver supports the Maxim MAX31790.
>
> Signed-off-by: Il Han <corone.il.han@gmail.com <mailto:corone.il.han@gmail.com>>
> ---
>
> +static ssize_t set_fan_target(struct device *dev,
> + struct device_attribute *devattr,
> + const char *buf, size_t count)
> +{
> + struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
> + struct i2c_client *client = to_i2c_client(dev);
> + struct max31790_data *data = i2c_get_clientdata(client);
>
>
> Did you test those set functions ?
>
> This should be
>
> struct max31790_data *data = dev_get_drvdata(dev);
> struct i2c_client *client = data->client;
>
> The above code crashes, since dev is not an i2c client device.
>
> Guenter
>
>
> I tested them hundreds of times, but not on the latest kernel version.
> So I am going to modify them.
>
It has nothing to do with the kernel version, but with using the devm_ function
to register the hwmon device.
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2015-08-26 4:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 18:49 [lm-sensors] [PATCH] hwmon: Driver for Maxim MAX31790 Il Han
2015-07-30 2:41 ` Guenter Roeck
2015-08-03 18:36 ` Guenter Roeck
2015-08-04 7:07 ` Il Han
2015-08-06 3:48 ` Guenter Roeck
2015-08-10 15:48 ` Il Han
2015-08-17 11:31 ` Il Han
2015-08-18 3:22 ` Guenter Roeck
2015-08-23 14:01 ` Il Han
2015-08-23 15:02 ` Guenter Roeck
2015-08-25 5:52 ` Il Han
2015-08-25 14:52 ` Guenter Roeck
2015-08-26 3:49 ` Il Han
2015-08-26 4:15 ` Guenter Roeck [this message]
2015-08-26 4:27 ` Il Han
2015-08-30 11:44 ` Il Han
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=55DD3D74.7000203@roeck-us.net \
--to=linux@roeck-us.net \
--cc=lm-sensors@vger.kernel.org \
/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.