diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-24 18:05:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-20 00:22:33 -0400 |
commit | 567b21e973ccf5b0d13776e408d7c67099749eb8 (patch) | |
tree | 664fd8f1e8d0bbed8e28b8bf852dee25aa429ad7 /arch/mips | |
parent | cebcac7c59e812d17237c13405aa6886199a1b90 (diff) |
mips: convert vpe_class to use dev_groups
The dev_attrs field of struct class is going away soon, dev_groups
should be used instead. This converts the MIPS vpe_class code to use
the correct field.
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: John Crispin <blogic@openwrt.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/vpe.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 1765bab000a0..faf84c5f2629 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -1335,8 +1335,9 @@ static ssize_t store_kill(struct device *dev, struct device_attribute *attr, | |||
1335 | 1335 | ||
1336 | return len; | 1336 | return len; |
1337 | } | 1337 | } |
1338 | static DEVICE_ATTR(kill, S_IWUSR, NULL, store_kill); | ||
1338 | 1339 | ||
1339 | static ssize_t show_ntcs(struct device *cd, struct device_attribute *attr, | 1340 | static ssize_t ntcs_show(struct device *cd, struct device_attribute *attr, |
1340 | char *buf) | 1341 | char *buf) |
1341 | { | 1342 | { |
1342 | struct vpe *vpe = get_vpe(tclimit); | 1343 | struct vpe *vpe = get_vpe(tclimit); |
@@ -1344,7 +1345,7 @@ static ssize_t show_ntcs(struct device *cd, struct device_attribute *attr, | |||
1344 | return sprintf(buf, "%d\n", vpe->ntcs); | 1345 | return sprintf(buf, "%d\n", vpe->ntcs); |
1345 | } | 1346 | } |
1346 | 1347 | ||
1347 | static ssize_t store_ntcs(struct device *dev, struct device_attribute *attr, | 1348 | static ssize_t ntcs_store(struct device *dev, struct device_attribute *attr, |
1348 | const char *buf, size_t len) | 1349 | const char *buf, size_t len) |
1349 | { | 1350 | { |
1350 | struct vpe *vpe = get_vpe(tclimit); | 1351 | struct vpe *vpe = get_vpe(tclimit); |
@@ -1365,12 +1366,14 @@ static ssize_t store_ntcs(struct device *dev, struct device_attribute *attr, | |||
1365 | out_einval: | 1366 | out_einval: |
1366 | return -EINVAL; | 1367 | return -EINVAL; |
1367 | } | 1368 | } |
1369 | static DEVICE_ATTR_RW(ntcs); | ||
1368 | 1370 | ||
1369 | static struct device_attribute vpe_class_attributes[] = { | 1371 | static struct attribute vpe_attrs[] = { |
1370 | __ATTR(kill, S_IWUSR, NULL, store_kill), | 1372 | &dev_attr_kill.attr, |
1371 | __ATTR(ntcs, S_IRUGO | S_IWUSR, show_ntcs, store_ntcs), | 1373 | &dev_attr_ntcs.attr, |
1372 | {} | 1374 | NULL, |
1373 | }; | 1375 | }; |
1376 | ATTRIBUTE_GROUPS(vpe); | ||
1374 | 1377 | ||
1375 | static void vpe_device_release(struct device *cd) | 1378 | static void vpe_device_release(struct device *cd) |
1376 | { | 1379 | { |
@@ -1381,7 +1384,7 @@ struct class vpe_class = { | |||
1381 | .name = "vpe", | 1384 | .name = "vpe", |
1382 | .owner = THIS_MODULE, | 1385 | .owner = THIS_MODULE, |
1383 | .dev_release = vpe_device_release, | 1386 | .dev_release = vpe_device_release, |
1384 | .dev_attrs = vpe_class_attributes, | 1387 | .dev_groups = vpe_groups, |
1385 | }; | 1388 | }; |
1386 | 1389 | ||
1387 | struct device vpe_device; | 1390 | struct device vpe_device; |