Commit 7c314991 authored by Liam Girdwood's avatar Liam Girdwood

regulator: build fix for powerpc - renamed show_state

This patch fixes the follwing build failure on powerpc:-

> Today's linux-next build (powerpc allyesconfig) failed like this:
>
> drivers/regulator/userspace-consumer.c:43: error: conflicting types
> for 'show_state'
> include/linux/sched.h:273: note: previous definition of 'show_state'
> was here
>
> Caused by commit 5defa2bce704ca4151cfe24e4297aa7797cafd22 ("regulator:
> add userspace-consumer driver") which I have reverted for today.
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 1d98cccf
...@@ -32,7 +32,7 @@ struct userspace_consumer_data { ...@@ -32,7 +32,7 @@ struct userspace_consumer_data {
struct regulator_bulk_data *supplies; struct regulator_bulk_data *supplies;
}; };
static ssize_t show_name(struct device *dev, static ssize_t reg_show_name(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct userspace_consumer_data *data = dev_get_drvdata(dev); struct userspace_consumer_data *data = dev_get_drvdata(dev);
...@@ -40,7 +40,7 @@ static ssize_t show_name(struct device *dev, ...@@ -40,7 +40,7 @@ static ssize_t show_name(struct device *dev,
return sprintf(buf, "%s\n", data->name); return sprintf(buf, "%s\n", data->name);
} }
static ssize_t show_state(struct device *dev, static ssize_t reg_show_state(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct userspace_consumer_data *data = dev_get_drvdata(dev); struct userspace_consumer_data *data = dev_get_drvdata(dev);
...@@ -51,7 +51,7 @@ static ssize_t show_state(struct device *dev, ...@@ -51,7 +51,7 @@ static ssize_t show_state(struct device *dev,
return sprintf(buf, "disabled\n"); return sprintf(buf, "disabled\n");
} }
static ssize_t set_state(struct device *dev, struct device_attribute *attr, static ssize_t reg_set_state(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
struct userspace_consumer_data *data = dev_get_drvdata(dev); struct userspace_consumer_data *data = dev_get_drvdata(dev);
...@@ -90,8 +90,8 @@ static ssize_t set_state(struct device *dev, struct device_attribute *attr, ...@@ -90,8 +90,8 @@ static ssize_t set_state(struct device *dev, struct device_attribute *attr,
return count; return count;
} }
static DEVICE_ATTR(name, 0444, show_name, NULL); static DEVICE_ATTR(name, 0444, reg_show_name, NULL);
static DEVICE_ATTR(state, 0644, show_state, set_state); static DEVICE_ATTR(state, 0644, reg_show_state, reg_set_state);
static struct device_attribute *attributes[] = { static struct device_attribute *attributes[] = {
&dev_attr_name, &dev_attr_name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment