Thread (1 message) 1 message, 1 author, 2013-02-20

Re: [RFC PATCH 2/9] hwmon: (lm90) split set&show temp as common codes

From: Wei Ni <hidden>
Date: 2013-02-20 12:31:37
Also in: linux-arm-kernel, linux-devicetree, linux-tegra

On 02/20/2013 06:56 AM, Stephen Warren wrote:
On 02/18/2013 04:30 AM, Wei Ni wrote:
quoted
Split set&show temp codes as common functions, so we can use it directly when
implement linux thermal framework.
quoted
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
quoted
-static ssize_t show_temp8(struct device *dev, struct device_attribute *devattr,
-			  char *buf)
+static void _show_temp8(struct device *dev, int index, int *temp)
This function now seems to be "get" not "show". If you rename it to e.g.
"get_temp8", then you won't need to use an _ in the function name. If
that name causes conflicts with later patches, perhaps "read_temp8".
Yes, it looks "read_" is better.
I will change it.
quoted
-static ssize_t set_temp8(struct device *dev, struct device_attribute *devattr,
-			 const char *buf, size_t count)
+static void _set_temp8(struct device *dev, int index, long val)
Similarly, perhaps "write_temp8"?

Similar comments for the rest of the patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help