aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi/ibmvfc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvfc.c')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c67
1 files changed, 13 insertions, 54 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index c450a346590..26abed2c3a4 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -2434,14 +2434,6 @@ static ssize_t ibmvfc_show_host_partition_name(struct device *dev,
2434 vhost->login_buf->resp.partition_name); 2434 vhost->login_buf->resp.partition_name);
2435} 2435}
2436 2436
2437static struct device_attribute ibmvfc_host_partition_name = {
2438 .attr = {
2439 .name = "partition_name",
2440 .mode = S_IRUGO,
2441 },
2442 .show = ibmvfc_show_host_partition_name,
2443};
2444
2445static ssize_t ibmvfc_show_host_device_name(struct device *dev, 2437static ssize_t ibmvfc_show_host_device_name(struct device *dev,
2446 struct device_attribute *attr, char *buf) 2438 struct device_attribute *attr, char *buf)
2447{ 2439{
@@ -2452,14 +2444,6 @@ static ssize_t ibmvfc_show_host_device_name(struct device *dev,
2452 vhost->login_buf->resp.device_name); 2444 vhost->login_buf->resp.device_name);
2453} 2445}
2454 2446
2455static struct device_attribute ibmvfc_host_device_name = {
2456 .attr = {
2457 .name = "device_name",
2458 .mode = S_IRUGO,
2459 },
2460 .show = ibmvfc_show_host_device_name,
2461};
2462
2463static ssize_t ibmvfc_show_host_loc_code(struct device *dev, 2447static ssize_t ibmvfc_show_host_loc_code(struct device *dev,
2464 struct device_attribute *attr, char *buf) 2448 struct device_attribute *attr, char *buf)
2465{ 2449{
@@ -2470,14 +2454,6 @@ static ssize_t ibmvfc_show_host_loc_code(struct device *dev,
2470 vhost->login_buf->resp.port_loc_code); 2454 vhost->login_buf->resp.port_loc_code);
2471} 2455}
2472 2456
2473static struct device_attribute ibmvfc_host_loc_code = {
2474 .attr = {
2475 .name = "port_loc_code",
2476 .mode = S_IRUGO,
2477 },
2478 .show = ibmvfc_show_host_loc_code,
2479};
2480
2481static ssize_t ibmvfc_show_host_drc_name(struct device *dev, 2457static ssize_t ibmvfc_show_host_drc_name(struct device *dev,
2482 struct device_attribute *attr, char *buf) 2458 struct device_attribute *attr, char *buf)
2483{ 2459{
@@ -2488,14 +2464,6 @@ static ssize_t ibmvfc_show_host_drc_name(struct device *dev,
2488 vhost->login_buf->resp.drc_name); 2464 vhost->login_buf->resp.drc_name);
2489} 2465}
2490 2466
2491static struct device_attribute ibmvfc_host_drc_name = {
2492 .attr = {
2493 .name = "drc_name",
2494 .mode = S_IRUGO,
2495 },
2496 .show = ibmvfc_show_host_drc_name,
2497};
2498
2499static ssize_t ibmvfc_show_host_npiv_version(struct device *dev, 2467static ssize_t ibmvfc_show_host_npiv_version(struct device *dev,
2500 struct device_attribute *attr, char *buf) 2468 struct device_attribute *attr, char *buf)
2501{ 2469{
@@ -2504,14 +2472,6 @@ static ssize_t ibmvfc_show_host_npiv_version(struct device *dev,
2504 return snprintf(buf, PAGE_SIZE, "%d\n", vhost->login_buf->resp.version); 2472 return snprintf(buf, PAGE_SIZE, "%d\n", vhost->login_buf->resp.version);
2505} 2473}
2506 2474
2507static struct device_attribute ibmvfc_host_npiv_version = {
2508 .attr = {
2509 .name = "npiv_version",
2510 .mode = S_IRUGO,
2511 },
2512 .show = ibmvfc_show_host_npiv_version,
2513};
2514
2515/** 2475/**
2516 * ibmvfc_show_log_level - Show the adapter's error logging level 2476 * ibmvfc_show_log_level - Show the adapter's error logging level
2517 * @dev: class device struct 2477 * @dev: class device struct
@@ -2556,14 +2516,13 @@ static ssize_t ibmvfc_store_log_level(struct device *dev,
2556 return strlen(buf); 2516 return strlen(buf);
2557} 2517}
2558 2518
2559static struct device_attribute ibmvfc_log_level_attr = { 2519static DEVICE_ATTR(partition_name, S_IRUGO, ibmvfc_show_host_partition_name, NULL);
2560 .attr = { 2520static DEVICE_ATTR(device_name, S_IRUGO, ibmvfc_show_host_device_name, NULL);
2561 .name = "log_level", 2521static DEVICE_ATTR(port_loc_code, S_IRUGO, ibmvfc_show_host_loc_code, NULL);
2562 .mode = S_IRUGO | S_IWUSR, 2522static DEVICE_ATTR(drc_name, S_IRUGO, ibmvfc_show_host_drc_name, NULL);
2563 }, 2523static DEVICE_ATTR(npiv_version, S_IRUGO, ibmvfc_show_host_npiv_version, NULL);
2564 .show = ibmvfc_show_log_level, 2524static DEVICE_ATTR(log_level, S_IRUGO | S_IWUSR,
2565 .store = ibmvfc_store_log_level 2525 ibmvfc_show_log_level, ibmvfc_store_log_level);
2566};
2567 2526
2568#ifdef CONFIG_SCSI_IBMVFC_TRACE 2527#ifdef CONFIG_SCSI_IBMVFC_TRACE
2569/** 2528/**
@@ -2612,12 +2571,12 @@ static struct bin_attribute ibmvfc_trace_attr = {
2612#endif 2571#endif
2613 2572
2614static struct device_attribute *ibmvfc_attrs[] = { 2573static struct device_attribute *ibmvfc_attrs[] = {
2615 &ibmvfc_host_partition_name, 2574 &dev_attr_partition_name,
2616 &ibmvfc_host_device_name, 2575 &dev_attr_device_name,
2617 &ibmvfc_host_loc_code, 2576 &dev_attr_port_loc_code,
2618 &ibmvfc_host_drc_name, 2577 &dev_attr_drc_name,
2619 &ibmvfc_host_npiv_version, 2578 &dev_attr_npiv_version,
2620 &ibmvfc_log_level_attr, 2579 &dev_attr_log_level,
2621 NULL 2580 NULL
2622}; 2581};
2623 2582