Commit 658bf027 authored by Patrick Mochel's avatar Patrick Mochel

sysfs: fixup some remaining s390 files.

From Arnd Bergmann.
parent 3750eee7
...@@ -616,13 +616,13 @@ chp_status_show(struct device *dev, char *buf) ...@@ -616,13 +616,13 @@ chp_status_show(struct device *dev, char *buf)
switch(chp->state) { switch(chp->state) {
case CHP_OFFLINE: case CHP_OFFLINE:
return snprintf(buf, count, "n/a\n"); return sprintf(buf, "n/a\n");
case CHP_LOGICALLY_OFFLINE: case CHP_LOGICALLY_OFFLINE:
return snprintf(buf, count, "logically offline\n"); return sprintf(buf, "logically offline\n");
case CHP_STANDBY: case CHP_STANDBY:
return snprintf(buf, count, "n/a\n"); return sprintf(buf, "n/a\n");
case CHP_ONLINE: case CHP_ONLINE:
return snprintf(buf, count, "online\n"); return sprintf(buf, "online\n");
default: default:
return 0; return 0;
} }
......
...@@ -2762,27 +2762,23 @@ ctc_init_netdevice(struct net_device * dev, int alloc_device, ...@@ -2762,27 +2762,23 @@ ctc_init_netdevice(struct net_device * dev, int alloc_device,
} }
static ssize_t static ssize_t
ctc_proto_show(struct device *dev, char *buf, size_t count, loff_t off) ctc_proto_show(struct device *dev, char *buf)
{ {
struct ctc_priv *priv; struct ctc_priv *priv;
if (off)
return 0;
priv = dev->driver_data; priv = dev->driver_data;
if (!priv) if (!priv)
return -ENODEV; return -ENODEV;
return snprintf(buf, count, "%d\n", priv->protocol); return sprintf(buf, "%d\n", priv->protocol);
} }
static ssize_t static ssize_t
ctc_proto_store(struct device *dev, const char *buf, size_t count, loff_t off) ctc_proto_store(struct device *dev, const char *buf, size_t count)
{ {
struct ctc_priv *priv; struct ctc_priv *priv;
int value; int value;
if (off)
return 0;
priv = dev->driver_data; priv = dev->driver_data;
if (!priv) if (!priv)
return -ENODEV; return -ENODEV;
......
...@@ -63,8 +63,7 @@ struct device cu3088_root_dev = { ...@@ -63,8 +63,7 @@ struct device cu3088_root_dev = {
}; };
static ssize_t static ssize_t
group_write(struct device_driver *drv, const char *buf, size_t count, group_write(struct device_driver *drv, const char *buf, size_t count)
loff_t off)
{ {
const char *start, *end; const char *start, *end;
char bus_ids[2][BUS_ID_SIZE], *argv[2]; char bus_ids[2][BUS_ID_SIZE], *argv[2];
...@@ -72,9 +71,6 @@ group_write(struct device_driver *drv, const char *buf, size_t count, ...@@ -72,9 +71,6 @@ group_write(struct device_driver *drv, const char *buf, size_t count,
int ret; int ret;
struct ccwgroup_driver *cdrv; struct ccwgroup_driver *cdrv;
if (off)
return 0;
cdrv = to_ccwgroupdrv(drv); cdrv = to_ccwgroupdrv(drv);
if (!cdrv) if (!cdrv)
return -EINVAL; return -EINVAL;
......
...@@ -1473,11 +1473,11 @@ txtime_show (struct device *dev, char *buf) ...@@ -1473,11 +1473,11 @@ txtime_show (struct device *dev, char *buf)
{ {
netiucv_priv *priv = dev->driver_data; netiucv_priv *priv = dev->driver_data;
return snprintf(buf, count, "%ld\n", priv->conn->prof.tx_time); return sprintf(buf, "%ld\n", priv->conn->prof.tx_time);
} }
static ssize_t static ssize_t
txtime_write (struct device *dev, const char *buf) txtime_write (struct device *dev, const char *buf, size_t count)
{ {
netiucv_priv *priv = dev->driver_data; netiucv_priv *priv = dev->driver_data;
......
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