Skip to content

Commit 314be14

Browse files
committed
iio: Rename _st_ functions to loose the bit that meant the staging version.
These were originally introduced when the plan was to have parallel IIO cores in and out of staging with a slow move between them. Now we have reached the point where the whole core has moved, they need clearing up! Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 6a17a07 commit 314be14

File tree

3 files changed

+38
-41
lines changed

3 files changed

+38
-41
lines changed

drivers/iio/inkern.c

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ int iio_map_array_unregister(struct iio_dev *indio_dev,
9292
EXPORT_SYMBOL_GPL(iio_map_array_unregister);
9393

9494
static const struct iio_chan_spec
95-
*iio_chan_spec_from_name(const struct iio_dev *indio_dev,
96-
const char *name)
95+
*iio_chan_spec_from_name(const struct iio_dev *indio_dev, const char *name)
9796
{
9897
int i;
9998
const struct iio_chan_spec *chan = NULL;
@@ -108,8 +107,7 @@ static const struct iio_chan_spec
108107
}
109108

110109

111-
struct iio_channel *iio_st_channel_get(const char *name,
112-
const char *channel_name)
110+
struct iio_channel *iio_channel_get(const char *name, const char *channel_name)
113111
{
114112
struct iio_map_internal *c_i = NULL, *c = NULL;
115113
struct iio_channel *channel;
@@ -145,16 +143,16 @@ struct iio_channel *iio_st_channel_get(const char *name,
145143

146144
return channel;
147145
}
148-
EXPORT_SYMBOL_GPL(iio_st_channel_get);
146+
EXPORT_SYMBOL_GPL(iio_channel_get);
149147

150-
void iio_st_channel_release(struct iio_channel *channel)
148+
void iio_channel_release(struct iio_channel *channel)
151149
{
152150
iio_device_put(channel->indio_dev);
153151
kfree(channel);
154152
}
155-
EXPORT_SYMBOL_GPL(iio_st_channel_release);
153+
EXPORT_SYMBOL_GPL(iio_channel_release);
156154

157-
struct iio_channel *iio_st_channel_get_all(const char *name)
155+
struct iio_channel *iio_channel_get_all(const char *name)
158156
{
159157
struct iio_channel *chans;
160158
struct iio_map_internal *c = NULL;
@@ -217,9 +215,9 @@ struct iio_channel *iio_st_channel_get_all(const char *name)
217215

218216
return ERR_PTR(ret);
219217
}
220-
EXPORT_SYMBOL_GPL(iio_st_channel_get_all);
218+
EXPORT_SYMBOL_GPL(iio_channel_get_all);
221219

222-
void iio_st_channel_release_all(struct iio_channel *channels)
220+
void iio_channel_release_all(struct iio_channel *channels)
223221
{
224222
struct iio_channel *chan = &channels[0];
225223

@@ -229,9 +227,9 @@ void iio_st_channel_release_all(struct iio_channel *channels)
229227
}
230228
kfree(channels);
231229
}
232-
EXPORT_SYMBOL_GPL(iio_st_channel_release_all);
230+
EXPORT_SYMBOL_GPL(iio_channel_release_all);
233231

234-
int iio_st_read_channel_raw(struct iio_channel *chan, int *val)
232+
int iio_read_channel_raw(struct iio_channel *chan, int *val)
235233
{
236234
int val2, ret;
237235

@@ -248,9 +246,9 @@ int iio_st_read_channel_raw(struct iio_channel *chan, int *val)
248246

249247
return ret;
250248
}
251-
EXPORT_SYMBOL_GPL(iio_st_read_channel_raw);
249+
EXPORT_SYMBOL_GPL(iio_read_channel_raw);
252250

253-
int iio_st_read_channel_scale(struct iio_channel *chan, int *val, int *val2)
251+
int iio_read_channel_scale(struct iio_channel *chan, int *val, int *val2)
254252
{
255253
int ret;
256254

@@ -269,10 +267,9 @@ int iio_st_read_channel_scale(struct iio_channel *chan, int *val, int *val2)
269267

270268
return ret;
271269
}
272-
EXPORT_SYMBOL_GPL(iio_st_read_channel_scale);
270+
EXPORT_SYMBOL_GPL(iio_read_channel_scale);
273271

274-
int iio_st_get_channel_type(struct iio_channel *chan,
275-
enum iio_chan_type *type)
272+
int iio_get_channel_type(struct iio_channel *chan, enum iio_chan_type *type)
276273
{
277274
int ret = 0;
278275
/* Need to verify underlying driver has not gone away */
@@ -289,4 +286,4 @@ int iio_st_get_channel_type(struct iio_channel *chan,
289286

290287
return ret;
291288
}
292-
EXPORT_SYMBOL_GPL(iio_st_get_channel_type);
289+
EXPORT_SYMBOL_GPL(iio_get_channel_type);

drivers/staging/iio/iio_hwmon.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ static ssize_t iio_hwmon_read_val(struct device *dev,
5151
* No locking between this pair, so theoretically possible
5252
* the scale has changed.
5353
*/
54-
ret = iio_st_read_channel_raw(&state->channels[sattr->index],
54+
ret = iio_read_channel_raw(&state->channels[sattr->index],
5555
&val);
5656
if (ret < 0)
5757
return ret;
5858

59-
ret = iio_st_read_channel_scale(&state->channels[sattr->index],
59+
ret = iio_read_channel_scale(&state->channels[sattr->index],
6060
&scaleint, &scalepart);
6161
if (ret < 0)
6262
return ret;
@@ -106,7 +106,7 @@ static int __devinit iio_hwmon_probe(struct platform_device *pdev)
106106
goto error_ret;
107107
}
108108

109-
st->channels = iio_st_channel_get_all(dev_name(&pdev->dev));
109+
st->channels = iio_channel_get_all(dev_name(&pdev->dev));
110110
if (IS_ERR(st->channels)) {
111111
ret = PTR_ERR(st->channels);
112112
goto error_free_state;
@@ -130,7 +130,7 @@ static int __devinit iio_hwmon_probe(struct platform_device *pdev)
130130
}
131131

132132
sysfs_attr_init(&a->dev_attr.attr);
133-
ret = iio_st_get_channel_type(&st->channels[i], &type);
133+
ret = iio_get_channel_type(&st->channels[i], &type);
134134
if (ret < 0) {
135135
kfree(a);
136136
goto error_free_attrs;
@@ -186,7 +186,7 @@ static int __devinit iio_hwmon_probe(struct platform_device *pdev)
186186
iio_hwmon_free_attrs(st);
187187
kfree(st->attrs);
188188
error_release_channels:
189-
iio_st_channel_release_all(st->channels);
189+
iio_channel_release_all(st->channels);
190190
error_free_state:
191191
kfree(st);
192192
error_ret:
@@ -201,7 +201,7 @@ static int __devexit iio_hwmon_remove(struct platform_device *pdev)
201201
sysfs_remove_group(&pdev->dev.kobj, &st->attr_group);
202202
iio_hwmon_free_attrs(st);
203203
kfree(st->attrs);
204-
iio_st_channel_release_all(st->channels);
204+
iio_channel_release_all(st->channels);
205205

206206
return 0;
207207
}

include/linux/iio/consumer.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,55 +33,55 @@ struct iio_channel {
3333
* side. This typically describes the channels use within
3434
* the consumer. E.g. 'battery_voltage'
3535
*/
36-
struct iio_channel *iio_st_channel_get(const char *name,
37-
const char *consumer_channel);
36+
struct iio_channel *iio_channel_get(const char *name,
37+
const char *consumer_channel);
3838

3939
/**
40-
* iio_st_channel_release() - release channels obtained via iio_st_channel_get
40+
* iio_channel_release() - release channels obtained via iio_channel_get
4141
* @chan: The channel to be released.
4242
*/
43-
void iio_st_channel_release(struct iio_channel *chan);
43+
void iio_channel_release(struct iio_channel *chan);
4444

4545
/**
46-
* iio_st_channel_get_all() - get all channels associated with a client
46+
* iio_channel_get_all() - get all channels associated with a client
4747
* @name: name of consumer device.
4848
*
4949
* Returns an array of iio_channel structures terminated with one with
5050
* null iio_dev pointer.
5151
* This function is used by fairly generic consumers to get all the
5252
* channels registered as having this consumer.
5353
*/
54-
struct iio_channel *iio_st_channel_get_all(const char *name);
54+
struct iio_channel *iio_channel_get_all(const char *name);
5555

5656
/**
57-
* iio_st_channel_release_all() - reverse iio_st_get_all
57+
* iio_channel_release_all() - reverse iio_channel_get_all
5858
* @chan: Array of channels to be released.
5959
*/
60-
void iio_st_channel_release_all(struct iio_channel *chan);
60+
void iio_channel_release_all(struct iio_channel *chan);
6161

6262
/**
63-
* iio_st_read_channel_raw() - read from a given channel
63+
* iio_read_channel_raw() - read from a given channel
6464
* @channel: The channel being queried.
6565
* @val: Value read back.
6666
*
6767
* Note raw reads from iio channels are in adc counts and hence
6868
* scale will need to be applied if standard units required.
6969
*/
70-
int iio_st_read_channel_raw(struct iio_channel *chan,
71-
int *val);
70+
int iio_read_channel_raw(struct iio_channel *chan,
71+
int *val);
7272

7373
/**
74-
* iio_st_get_channel_type() - get the type of a channel
74+
* iio_get_channel_type() - get the type of a channel
7575
* @channel: The channel being queried.
7676
* @type: The type of the channel.
7777
*
7878
* returns the enum iio_chan_type of the channel
7979
*/
80-
int iio_st_get_channel_type(struct iio_channel *channel,
81-
enum iio_chan_type *type);
80+
int iio_get_channel_type(struct iio_channel *channel,
81+
enum iio_chan_type *type);
8282

8383
/**
84-
* iio_st_read_channel_scale() - read the scale value for a channel
84+
* iio_read_channel_scale() - read the scale value for a channel
8585
* @channel: The channel being queried.
8686
* @val: First part of value read back.
8787
* @val2: Second part of value read back.
@@ -90,7 +90,7 @@ int iio_st_get_channel_type(struct iio_channel *channel,
9090
* as IIO_VAL_INT_PLUS_MICRO telling us we have a value of val
9191
* + val2/1e6
9292
*/
93-
int iio_st_read_channel_scale(struct iio_channel *chan, int *val,
94-
int *val2);
93+
int iio_read_channel_scale(struct iio_channel *chan, int *val,
94+
int *val2);
9595

9696
#endif

0 commit comments

Comments
 (0)