From: Sean MacLennan <seanm@seanm.ca>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] Add driver for AD7414 i2c temperature
Date: Tue, 19 Feb 2008 02:21:02 +0000 [thread overview]
Message-ID: <47BA3D0E.5060800@seanm.ca> (raw)
In-Reply-To: <A42C17A8FF150C4DB98BFD6497D1D00007F45D79@ussvlexmbpf1.spansion.com>
Jean Delvare wrote:
> Great, thanks for testing. Would you also feel like reviewing the code?
>
>
I grabbed the original message from the web interface. Some of the
longer lines were wrapped, I am not sure if that is a problem with the
original patch, or the web interface. An example is:
+ * Copyright 2006 Stefan Roese <sr at denx.de>, DENX Software
Engineering
Some comments:
+struct ad7414_data {
+ struct i2c_client client;
+ struct class_device *dev;
I this this should be struct device, not class_device.
+ struct mutex lock; /* atomic read data updates */
Line up?
+ char valid; /* !=0 if following fields are
valid */
+ unsigned long last_updated; /* In jiffies */
Line up?
+ u16 temp_input; /* Register values */
+ u8 temp_max;
+ u8 temp_min;
+ u8 temp_alert;
+ u8 temp_max_flag;
+ u8 temp_min_flag;
+};
Much codes goes by ;)
+static int ad7414_remove(struct i2c_client *client)
+{
+ struct ad7414_data *data = i2c_get_clientdata(client);
+
+ hwmon_device_unregister(data->dev);
+ sysfs_remove_group(&client->dev.kobj, &ad7414_group);
+ kfree(data);
+ return 0;
+}
+
+static struct i2c_driver ad7414_driver = {
+ .driver = {
+ .name = "ad7414",
+ },
+ .probe = ad7414_probe,
+ .remove = __devexit_p(ad7414_remove),
+};
I believe the ad7414_remove function needs a _devexit to match the
__devexit_p. Other than that, the code looks clean.
Cheers,
Sean
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2008-02-19 2:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-12 16:50 [lm-sensors] [PATCH] Add driver for AD7414 i2c temperature sensor Edelhaeuser, Frank
2008-02-17 20:33 ` Sean MacLennan
2008-02-18 12:30 ` [lm-sensors] [PATCH] Add driver for AD7414 i2c temperature Jean Delvare
2008-02-18 18:15 ` Sean MacLennan
2008-02-18 18:55 ` Jean Delvare
2008-02-19 2:21 ` Sean MacLennan [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-06-15 8:01 Jean Delvare
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=47BA3D0E.5060800@seanm.ca \
--to=seanm@seanm.ca \
--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.