diff options
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 1b9a711beb85..b4ee18bf35f4 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -410,8 +410,7 @@ static int setup_sge_qsets(struct adapter *adap) | |||
410 | return 0; | 410 | return 0; |
411 | } | 411 | } |
412 | 412 | ||
413 | static ssize_t attr_show(struct device *d, struct device_attribute *attr, | 413 | static ssize_t attr_show(struct device *d, char *buf, |
414 | char *buf, | ||
415 | ssize_t(*format) (struct net_device *, char *)) | 414 | ssize_t(*format) (struct net_device *, char *)) |
416 | { | 415 | { |
417 | ssize_t len; | 416 | ssize_t len; |
@@ -423,7 +422,7 @@ static ssize_t attr_show(struct device *d, struct device_attribute *attr, | |||
423 | return len; | 422 | return len; |
424 | } | 423 | } |
425 | 424 | ||
426 | static ssize_t attr_store(struct device *d, struct device_attribute *attr, | 425 | static ssize_t attr_store(struct device *d, |
427 | const char *buf, size_t len, | 426 | const char *buf, size_t len, |
428 | ssize_t(*set) (struct net_device *, unsigned int), | 427 | ssize_t(*set) (struct net_device *, unsigned int), |
429 | unsigned int min_val, unsigned int max_val) | 428 | unsigned int min_val, unsigned int max_val) |
@@ -457,7 +456,7 @@ static ssize_t format_##name(struct net_device *dev, char *buf) \ | |||
457 | static ssize_t show_##name(struct device *d, struct device_attribute *attr, \ | 456 | static ssize_t show_##name(struct device *d, struct device_attribute *attr, \ |
458 | char *buf) \ | 457 | char *buf) \ |
459 | { \ | 458 | { \ |
460 | return attr_show(d, attr, buf, format_##name); \ | 459 | return attr_show(d, buf, format_##name); \ |
461 | } | 460 | } |
462 | 461 | ||
463 | static ssize_t set_nfilters(struct net_device *dev, unsigned int val) | 462 | static ssize_t set_nfilters(struct net_device *dev, unsigned int val) |
@@ -480,7 +479,7 @@ static ssize_t set_nfilters(struct net_device *dev, unsigned int val) | |||
480 | static ssize_t store_nfilters(struct device *d, struct device_attribute *attr, | 479 | static ssize_t store_nfilters(struct device *d, struct device_attribute *attr, |
481 | const char *buf, size_t len) | 480 | const char *buf, size_t len) |
482 | { | 481 | { |
483 | return attr_store(d, attr, buf, len, set_nfilters, 0, ~0); | 482 | return attr_store(d, buf, len, set_nfilters, 0, ~0); |
484 | } | 483 | } |
485 | 484 | ||
486 | static ssize_t set_nservers(struct net_device *dev, unsigned int val) | 485 | static ssize_t set_nservers(struct net_device *dev, unsigned int val) |
@@ -500,7 +499,7 @@ static ssize_t set_nservers(struct net_device *dev, unsigned int val) | |||
500 | static ssize_t store_nservers(struct device *d, struct device_attribute *attr, | 499 | static ssize_t store_nservers(struct device *d, struct device_attribute *attr, |
501 | const char *buf, size_t len) | 500 | const char *buf, size_t len) |
502 | { | 501 | { |
503 | return attr_store(d, attr, buf, len, set_nservers, 0, ~0); | 502 | return attr_store(d, buf, len, set_nservers, 0, ~0); |
504 | } | 503 | } |
505 | 504 | ||
506 | #define CXGB3_ATTR_R(name, val_expr) \ | 505 | #define CXGB3_ATTR_R(name, val_expr) \ |
@@ -524,7 +523,7 @@ static struct attribute *cxgb3_attrs[] = { | |||
524 | 523 | ||
525 | static struct attribute_group cxgb3_attr_group = {.attrs = cxgb3_attrs }; | 524 | static struct attribute_group cxgb3_attr_group = {.attrs = cxgb3_attrs }; |
526 | 525 | ||
527 | static ssize_t tm_attr_show(struct device *d, struct device_attribute *attr, | 526 | static ssize_t tm_attr_show(struct device *d, |
528 | char *buf, int sched) | 527 | char *buf, int sched) |
529 | { | 528 | { |
530 | struct port_info *pi = netdev_priv(to_net_dev(d)); | 529 | struct port_info *pi = netdev_priv(to_net_dev(d)); |
@@ -550,7 +549,7 @@ static ssize_t tm_attr_show(struct device *d, struct device_attribute *attr, | |||
550 | return len; | 549 | return len; |
551 | } | 550 | } |
552 | 551 | ||
553 | static ssize_t tm_attr_store(struct device *d, struct device_attribute *attr, | 552 | static ssize_t tm_attr_store(struct device *d, |
554 | const char *buf, size_t len, int sched) | 553 | const char *buf, size_t len, int sched) |
555 | { | 554 | { |
556 | struct port_info *pi = netdev_priv(to_net_dev(d)); | 555 | struct port_info *pi = netdev_priv(to_net_dev(d)); |
@@ -578,12 +577,12 @@ static ssize_t tm_attr_store(struct device *d, struct device_attribute *attr, | |||
578 | static ssize_t show_##name(struct device *d, struct device_attribute *attr, \ | 577 | static ssize_t show_##name(struct device *d, struct device_attribute *attr, \ |
579 | char *buf) \ | 578 | char *buf) \ |
580 | { \ | 579 | { \ |
581 | return tm_attr_show(d, attr, buf, sched); \ | 580 | return tm_attr_show(d, buf, sched); \ |
582 | } \ | 581 | } \ |
583 | static ssize_t store_##name(struct device *d, struct device_attribute *attr, \ | 582 | static ssize_t store_##name(struct device *d, struct device_attribute *attr, \ |
584 | const char *buf, size_t len) \ | 583 | const char *buf, size_t len) \ |
585 | { \ | 584 | { \ |
586 | return tm_attr_store(d, attr, buf, len, sched); \ | 585 | return tm_attr_store(d, buf, len, sched); \ |
587 | } \ | 586 | } \ |
588 | static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, show_##name, store_##name) | 587 | static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, show_##name, store_##name) |
589 | 588 | ||