diff options
author | Tony Jones <tonyj@suse.de> | 2008-02-21 18:13:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-19 22:10:33 -0400 |
commit | ee959b00c335d7780136c5abda37809191fe52c3 (patch) | |
tree | 7775f3b274fd8caf5e7e5154fea89e96f2babd94 /drivers/scsi/ipr.c | |
parent | 56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (diff) |
SCSI: convert struct class_device to struct device
It's big, but there doesn't seem to be a way to split it up smaller...
Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 140 |
1 files changed, 75 insertions, 65 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 65dc18dea845..de5ae6a65029 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -2431,7 +2431,7 @@ restart: | |||
2431 | } | 2431 | } |
2432 | 2432 | ||
2433 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); | 2433 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); |
2434 | kobject_uevent(&ioa_cfg->host->shost_classdev.kobj, KOBJ_CHANGE); | 2434 | kobject_uevent(&ioa_cfg->host->shost_dev.kobj, KOBJ_CHANGE); |
2435 | LEAVE; | 2435 | LEAVE; |
2436 | } | 2436 | } |
2437 | 2437 | ||
@@ -2451,8 +2451,8 @@ static ssize_t ipr_read_trace(struct kobject *kobj, | |||
2451 | struct bin_attribute *bin_attr, | 2451 | struct bin_attribute *bin_attr, |
2452 | char *buf, loff_t off, size_t count) | 2452 | char *buf, loff_t off, size_t count) |
2453 | { | 2453 | { |
2454 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 2454 | struct device *dev = container_of(kobj, struct device, kobj); |
2455 | struct Scsi_Host *shost = class_to_shost(cdev); | 2455 | struct Scsi_Host *shost = class_to_shost(dev); |
2456 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 2456 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
2457 | unsigned long lock_flags = 0; | 2457 | unsigned long lock_flags = 0; |
2458 | int size = IPR_TRACE_SIZE; | 2458 | int size = IPR_TRACE_SIZE; |
@@ -2492,15 +2492,16 @@ static const struct { | |||
2492 | 2492 | ||
2493 | /** | 2493 | /** |
2494 | * ipr_show_write_caching - Show the write caching attribute | 2494 | * ipr_show_write_caching - Show the write caching attribute |
2495 | * @class_dev: class device struct | 2495 | * @dev: device struct |
2496 | * @buf: buffer | 2496 | * @buf: buffer |
2497 | * | 2497 | * |
2498 | * Return value: | 2498 | * Return value: |
2499 | * number of bytes printed to buffer | 2499 | * number of bytes printed to buffer |
2500 | **/ | 2500 | **/ |
2501 | static ssize_t ipr_show_write_caching(struct class_device *class_dev, char *buf) | 2501 | static ssize_t ipr_show_write_caching(struct device *dev, |
2502 | struct device_attribute *attr, char *buf) | ||
2502 | { | 2503 | { |
2503 | struct Scsi_Host *shost = class_to_shost(class_dev); | 2504 | struct Scsi_Host *shost = class_to_shost(dev); |
2504 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 2505 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
2505 | unsigned long lock_flags = 0; | 2506 | unsigned long lock_flags = 0; |
2506 | int i, len = 0; | 2507 | int i, len = 0; |
@@ -2519,19 +2520,20 @@ static ssize_t ipr_show_write_caching(struct class_device *class_dev, char *buf) | |||
2519 | 2520 | ||
2520 | /** | 2521 | /** |
2521 | * ipr_store_write_caching - Enable/disable adapter write cache | 2522 | * ipr_store_write_caching - Enable/disable adapter write cache |
2522 | * @class_dev: class_device struct | 2523 | * @dev: device struct |
2523 | * @buf: buffer | 2524 | * @buf: buffer |
2524 | * @count: buffer size | 2525 | * @count: buffer size |
2525 | * | 2526 | * |
2526 | * This function will enable/disable adapter write cache. | 2527 | * This function will enable/disable adapter write cache. |
2527 | * | 2528 | * |
2528 | * Return value: | 2529 | * Return value: |
2529 | * count on success / other on failure | 2530 | * count on success / other on failure |
2530 | **/ | 2531 | **/ |
2531 | static ssize_t ipr_store_write_caching(struct class_device *class_dev, | 2532 | static ssize_t ipr_store_write_caching(struct device *dev, |
2532 | const char *buf, size_t count) | 2533 | struct device_attribute *attr, |
2534 | const char *buf, size_t count) | ||
2533 | { | 2535 | { |
2534 | struct Scsi_Host *shost = class_to_shost(class_dev); | 2536 | struct Scsi_Host *shost = class_to_shost(dev); |
2535 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 2537 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
2536 | unsigned long lock_flags = 0; | 2538 | unsigned long lock_flags = 0; |
2537 | enum ipr_cache_state new_state = CACHE_INVALID; | 2539 | enum ipr_cache_state new_state = CACHE_INVALID; |
@@ -2569,7 +2571,7 @@ static ssize_t ipr_store_write_caching(struct class_device *class_dev, | |||
2569 | return count; | 2571 | return count; |
2570 | } | 2572 | } |
2571 | 2573 | ||
2572 | static struct class_device_attribute ipr_ioa_cache_attr = { | 2574 | static struct device_attribute ipr_ioa_cache_attr = { |
2573 | .attr = { | 2575 | .attr = { |
2574 | .name = "write_cache", | 2576 | .name = "write_cache", |
2575 | .mode = S_IRUGO | S_IWUSR, | 2577 | .mode = S_IRUGO | S_IWUSR, |
@@ -2580,15 +2582,16 @@ static struct class_device_attribute ipr_ioa_cache_attr = { | |||
2580 | 2582 | ||
2581 | /** | 2583 | /** |
2582 | * ipr_show_fw_version - Show the firmware version | 2584 | * ipr_show_fw_version - Show the firmware version |
2583 | * @class_dev: class device struct | 2585 | * @dev: class device struct |
2584 | * @buf: buffer | 2586 | * @buf: buffer |
2585 | * | 2587 | * |
2586 | * Return value: | 2588 | * Return value: |
2587 | * number of bytes printed to buffer | 2589 | * number of bytes printed to buffer |
2588 | **/ | 2590 | **/ |
2589 | static ssize_t ipr_show_fw_version(struct class_device *class_dev, char *buf) | 2591 | static ssize_t ipr_show_fw_version(struct device *dev, |
2592 | struct device_attribute *attr, char *buf) | ||
2590 | { | 2593 | { |
2591 | struct Scsi_Host *shost = class_to_shost(class_dev); | 2594 | struct Scsi_Host *shost = class_to_shost(dev); |
2592 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 2595 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
2593 | struct ipr_inquiry_page3 *ucode_vpd = &ioa_cfg->vpd_cbs->page3_data; | 2596 | struct ipr_inquiry_page3 *ucode_vpd = &ioa_cfg->vpd_cbs->page3_data; |
2594 | unsigned long lock_flags = 0; | 2597 | unsigned long lock_flags = 0; |
@@ -2603,7 +2606,7 @@ static ssize_t ipr_show_fw_version(struct class_device *class_dev, char *buf) | |||
2603 | return len; | 2606 | return len; |
2604 | } | 2607 | } |
2605 | 2608 | ||
2606 | static struct class_device_attribute ipr_fw_version_attr = { | 2609 | static struct device_attribute ipr_fw_version_attr = { |
2607 | .attr = { | 2610 | .attr = { |
2608 | .name = "fw_version", | 2611 | .name = "fw_version", |
2609 | .mode = S_IRUGO, | 2612 | .mode = S_IRUGO, |
@@ -2613,15 +2616,16 @@ static struct class_device_attribute ipr_fw_version_attr = { | |||
2613 | 2616 | ||
2614 | /** | 2617 | /** |
2615 | * ipr_show_log_level - Show the adapter's error logging level | 2618 | * ipr_show_log_level - Show the adapter's error logging level |
2616 | * @class_dev: class device struct | 2619 | * @dev: class device struct |
2617 | * @buf: buffer | 2620 | * @buf: buffer |
2618 | * | 2621 | * |
2619 | * Return value: | 2622 | * Return value: |
2620 | * number of bytes printed to buffer | 2623 | * number of bytes printed to buffer |
2621 | **/ | 2624 | **/ |
2622 | static ssize_t ipr_show_log_level(struct class_device *class_dev, char *buf) | 2625 | static ssize_t ipr_show_log_level(struct device *dev, |
2626 | struct device_attribute *attr, char *buf) | ||
2623 | { | 2627 | { |
2624 | struct Scsi_Host *shost = class_to_shost(class_dev); | 2628 | struct Scsi_Host *shost = class_to_shost(dev); |
2625 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 2629 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
2626 | unsigned long lock_flags = 0; | 2630 | unsigned long lock_flags = 0; |
2627 | int len; | 2631 | int len; |
@@ -2634,16 +2638,17 @@ static ssize_t ipr_show_log_level(struct class_device *class_dev, char *buf) | |||
2634 | 2638 | ||
2635 | /** | 2639 | /** |
2636 | * ipr_store_log_level - Change the adapter's error logging level | 2640 | * ipr_store_log_level - Change the adapter's error logging level |
2637 | * @class_dev: class device struct | 2641 | * @dev: class device struct |
2638 | * @buf: buffer | 2642 | * @buf: buffer |
2639 | * | 2643 | * |
2640 | * Return value: | 2644 | * Return value: |
2641 | * number of bytes printed to buffer | 2645 | * number of bytes printed to buffer |
2642 | **/ | 2646 | **/ |
2643 | static ssize_t ipr_store_log_level(struct class_device *class_dev, | 2647 | static ssize_t ipr_store_log_level(struct device *dev, |
2648 | struct device_attribute *attr, | ||
2644 | const char *buf, size_t count) | 2649 | const char *buf, size_t count) |
2645 | { | 2650 | { |
2646 | struct Scsi_Host *shost = class_to_shost(class_dev); | 2651 | struct Scsi_Host *shost = class_to_shost(dev); |
2647 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 2652 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
2648 | unsigned long lock_flags = 0; | 2653 | unsigned long lock_flags = 0; |
2649 | 2654 | ||
@@ -2653,7 +2658,7 @@ static ssize_t ipr_store_log_level(struct class_device *class_dev, | |||
2653 | return strlen(buf); | 2658 | return strlen(buf); |
2654 | } | 2659 | } |
2655 | 2660 | ||
2656 | static struct class_device_attribute ipr_log_level_attr = { | 2661 | static struct device_attribute ipr_log_level_attr = { |
2657 | .attr = { | 2662 | .attr = { |
2658 | .name = "log_level", | 2663 | .name = "log_level", |
2659 | .mode = S_IRUGO | S_IWUSR, | 2664 | .mode = S_IRUGO | S_IWUSR, |
@@ -2664,9 +2669,9 @@ static struct class_device_attribute ipr_log_level_attr = { | |||
2664 | 2669 | ||
2665 | /** | 2670 | /** |
2666 | * ipr_store_diagnostics - IOA Diagnostics interface | 2671 | * ipr_store_diagnostics - IOA Diagnostics interface |
2667 | * @class_dev: class_device struct | 2672 | * @dev: device struct |
2668 | * @buf: buffer | 2673 | * @buf: buffer |
2669 | * @count: buffer size | 2674 | * @count: buffer size |
2670 | * | 2675 | * |
2671 | * This function will reset the adapter and wait a reasonable | 2676 | * This function will reset the adapter and wait a reasonable |
2672 | * amount of time for any errors that the adapter might log. | 2677 | * amount of time for any errors that the adapter might log. |
@@ -2674,10 +2679,11 @@ static struct class_device_attribute ipr_log_level_attr = { | |||
2674 | * Return value: | 2679 | * Return value: |
2675 | * count on success / other on failure | 2680 | * count on success / other on failure |
2676 | **/ | 2681 | **/ |
2677 | static ssize_t ipr_store_diagnostics(struct class_device *class_dev, | 2682 | static ssize_t ipr_store_diagnostics(struct device *dev, |
2683 | struct device_attribute *attr, | ||
2678 | const char *buf, size_t count) | 2684 | const char *buf, size_t count) |
2679 | { | 2685 | { |
2680 | struct Scsi_Host *shost = class_to_shost(class_dev); | 2686 | struct Scsi_Host *shost = class_to_shost(dev); |
2681 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 2687 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
2682 | unsigned long lock_flags = 0; | 2688 | unsigned long lock_flags = 0; |
2683 | int rc = count; | 2689 | int rc = count; |
@@ -2714,7 +2720,7 @@ static ssize_t ipr_store_diagnostics(struct class_device *class_dev, | |||
2714 | return rc; | 2720 | return rc; |
2715 | } | 2721 | } |
2716 | 2722 | ||
2717 | static struct class_device_attribute ipr_diagnostics_attr = { | 2723 | static struct device_attribute ipr_diagnostics_attr = { |
2718 | .attr = { | 2724 | .attr = { |
2719 | .name = "run_diagnostics", | 2725 | .name = "run_diagnostics", |
2720 | .mode = S_IWUSR, | 2726 | .mode = S_IWUSR, |
@@ -2724,15 +2730,16 @@ static struct class_device_attribute ipr_diagnostics_attr = { | |||
2724 | 2730 | ||
2725 | /** | 2731 | /** |
2726 | * ipr_show_adapter_state - Show the adapter's state | 2732 | * ipr_show_adapter_state - Show the adapter's state |
2727 | * @class_dev: class device struct | 2733 | * @class_dev: device struct |
2728 | * @buf: buffer | 2734 | * @buf: buffer |
2729 | * | 2735 | * |
2730 | * Return value: | 2736 | * Return value: |
2731 | * number of bytes printed to buffer | 2737 | * number of bytes printed to buffer |
2732 | **/ | 2738 | **/ |
2733 | static ssize_t ipr_show_adapter_state(struct class_device *class_dev, char *buf) | 2739 | static ssize_t ipr_show_adapter_state(struct device *dev, |
2740 | struct device_attribute *attr, char *buf) | ||
2734 | { | 2741 | { |
2735 | struct Scsi_Host *shost = class_to_shost(class_dev); | 2742 | struct Scsi_Host *shost = class_to_shost(dev); |
2736 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 2743 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
2737 | unsigned long lock_flags = 0; | 2744 | unsigned long lock_flags = 0; |
2738 | int len; | 2745 | int len; |
@@ -2748,19 +2755,20 @@ static ssize_t ipr_show_adapter_state(struct class_device *class_dev, char *buf) | |||
2748 | 2755 | ||
2749 | /** | 2756 | /** |
2750 | * ipr_store_adapter_state - Change adapter state | 2757 | * ipr_store_adapter_state - Change adapter state |
2751 | * @class_dev: class_device struct | 2758 | * @dev: device struct |
2752 | * @buf: buffer | 2759 | * @buf: buffer |
2753 | * @count: buffer size | 2760 | * @count: buffer size |
2754 | * | 2761 | * |
2755 | * This function will change the adapter's state. | 2762 | * This function will change the adapter's state. |
2756 | * | 2763 | * |
2757 | * Return value: | 2764 | * Return value: |
2758 | * count on success / other on failure | 2765 | * count on success / other on failure |
2759 | **/ | 2766 | **/ |
2760 | static ssize_t ipr_store_adapter_state(struct class_device *class_dev, | 2767 | static ssize_t ipr_store_adapter_state(struct device *dev, |
2768 | struct device_attribute *attr, | ||
2761 | const char *buf, size_t count) | 2769 | const char *buf, size_t count) |
2762 | { | 2770 | { |
2763 | struct Scsi_Host *shost = class_to_shost(class_dev); | 2771 | struct Scsi_Host *shost = class_to_shost(dev); |
2764 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 2772 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
2765 | unsigned long lock_flags; | 2773 | unsigned long lock_flags; |
2766 | int result = count; | 2774 | int result = count; |
@@ -2781,7 +2789,7 @@ static ssize_t ipr_store_adapter_state(struct class_device *class_dev, | |||
2781 | return result; | 2789 | return result; |
2782 | } | 2790 | } |
2783 | 2791 | ||
2784 | static struct class_device_attribute ipr_ioa_state_attr = { | 2792 | static struct device_attribute ipr_ioa_state_attr = { |
2785 | .attr = { | 2793 | .attr = { |
2786 | .name = "state", | 2794 | .name = "state", |
2787 | .mode = S_IRUGO | S_IWUSR, | 2795 | .mode = S_IRUGO | S_IWUSR, |
@@ -2792,19 +2800,20 @@ static struct class_device_attribute ipr_ioa_state_attr = { | |||
2792 | 2800 | ||
2793 | /** | 2801 | /** |
2794 | * ipr_store_reset_adapter - Reset the adapter | 2802 | * ipr_store_reset_adapter - Reset the adapter |
2795 | * @class_dev: class_device struct | 2803 | * @dev: device struct |
2796 | * @buf: buffer | 2804 | * @buf: buffer |
2797 | * @count: buffer size | 2805 | * @count: buffer size |
2798 | * | 2806 | * |
2799 | * This function will reset the adapter. | 2807 | * This function will reset the adapter. |
2800 | * | 2808 | * |
2801 | * Return value: | 2809 | * Return value: |
2802 | * count on success / other on failure | 2810 | * count on success / other on failure |
2803 | **/ | 2811 | **/ |
2804 | static ssize_t ipr_store_reset_adapter(struct class_device *class_dev, | 2812 | static ssize_t ipr_store_reset_adapter(struct device *dev, |
2813 | struct device_attribute *attr, | ||
2805 | const char *buf, size_t count) | 2814 | const char *buf, size_t count) |
2806 | { | 2815 | { |
2807 | struct Scsi_Host *shost = class_to_shost(class_dev); | 2816 | struct Scsi_Host *shost = class_to_shost(dev); |
2808 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 2817 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
2809 | unsigned long lock_flags; | 2818 | unsigned long lock_flags; |
2810 | int result = count; | 2819 | int result = count; |
@@ -2821,7 +2830,7 @@ static ssize_t ipr_store_reset_adapter(struct class_device *class_dev, | |||
2821 | return result; | 2830 | return result; |
2822 | } | 2831 | } |
2823 | 2832 | ||
2824 | static struct class_device_attribute ipr_ioa_reset_attr = { | 2833 | static struct device_attribute ipr_ioa_reset_attr = { |
2825 | .attr = { | 2834 | .attr = { |
2826 | .name = "reset_host", | 2835 | .name = "reset_host", |
2827 | .mode = S_IWUSR, | 2836 | .mode = S_IWUSR, |
@@ -3054,19 +3063,20 @@ static int ipr_update_ioa_ucode(struct ipr_ioa_cfg *ioa_cfg, | |||
3054 | 3063 | ||
3055 | /** | 3064 | /** |
3056 | * ipr_store_update_fw - Update the firmware on the adapter | 3065 | * ipr_store_update_fw - Update the firmware on the adapter |
3057 | * @class_dev: class_device struct | 3066 | * @class_dev: device struct |
3058 | * @buf: buffer | 3067 | * @buf: buffer |
3059 | * @count: buffer size | 3068 | * @count: buffer size |
3060 | * | 3069 | * |
3061 | * This function will update the firmware on the adapter. | 3070 | * This function will update the firmware on the adapter. |
3062 | * | 3071 | * |
3063 | * Return value: | 3072 | * Return value: |
3064 | * count on success / other on failure | 3073 | * count on success / other on failure |
3065 | **/ | 3074 | **/ |
3066 | static ssize_t ipr_store_update_fw(struct class_device *class_dev, | 3075 | static ssize_t ipr_store_update_fw(struct device *dev, |
3067 | const char *buf, size_t count) | 3076 | struct device_attribute *attr, |
3077 | const char *buf, size_t count) | ||
3068 | { | 3078 | { |
3069 | struct Scsi_Host *shost = class_to_shost(class_dev); | 3079 | struct Scsi_Host *shost = class_to_shost(dev); |
3070 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 3080 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
3071 | struct ipr_ucode_image_header *image_hdr; | 3081 | struct ipr_ucode_image_header *image_hdr; |
3072 | const struct firmware *fw_entry; | 3082 | const struct firmware *fw_entry; |
@@ -3124,7 +3134,7 @@ out: | |||
3124 | return result; | 3134 | return result; |
3125 | } | 3135 | } |
3126 | 3136 | ||
3127 | static struct class_device_attribute ipr_update_fw_attr = { | 3137 | static struct device_attribute ipr_update_fw_attr = { |
3128 | .attr = { | 3138 | .attr = { |
3129 | .name = "update_fw", | 3139 | .name = "update_fw", |
3130 | .mode = S_IWUSR, | 3140 | .mode = S_IWUSR, |
@@ -3132,7 +3142,7 @@ static struct class_device_attribute ipr_update_fw_attr = { | |||
3132 | .store = ipr_store_update_fw | 3142 | .store = ipr_store_update_fw |
3133 | }; | 3143 | }; |
3134 | 3144 | ||
3135 | static struct class_device_attribute *ipr_ioa_attrs[] = { | 3145 | static struct device_attribute *ipr_ioa_attrs[] = { |
3136 | &ipr_fw_version_attr, | 3146 | &ipr_fw_version_attr, |
3137 | &ipr_log_level_attr, | 3147 | &ipr_log_level_attr, |
3138 | &ipr_diagnostics_attr, | 3148 | &ipr_diagnostics_attr, |
@@ -3159,7 +3169,7 @@ static ssize_t ipr_read_dump(struct kobject *kobj, | |||
3159 | struct bin_attribute *bin_attr, | 3169 | struct bin_attribute *bin_attr, |
3160 | char *buf, loff_t off, size_t count) | 3170 | char *buf, loff_t off, size_t count) |
3161 | { | 3171 | { |
3162 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 3172 | struct device *cdev = container_of(kobj, struct device, kobj); |
3163 | struct Scsi_Host *shost = class_to_shost(cdev); | 3173 | struct Scsi_Host *shost = class_to_shost(cdev); |
3164 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 3174 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
3165 | struct ipr_dump *dump; | 3175 | struct ipr_dump *dump; |
@@ -3322,7 +3332,7 @@ static ssize_t ipr_write_dump(struct kobject *kobj, | |||
3322 | struct bin_attribute *bin_attr, | 3332 | struct bin_attribute *bin_attr, |
3323 | char *buf, loff_t off, size_t count) | 3333 | char *buf, loff_t off, size_t count) |
3324 | { | 3334 | { |
3325 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 3335 | struct device *cdev = container_of(kobj, struct device, kobj); |
3326 | struct Scsi_Host *shost = class_to_shost(cdev); | 3336 | struct Scsi_Host *shost = class_to_shost(cdev); |
3327 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; | 3337 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; |
3328 | int rc; | 3338 | int rc; |
@@ -7671,9 +7681,9 @@ static void ipr_remove(struct pci_dev *pdev) | |||
7671 | 7681 | ||
7672 | ENTER; | 7682 | ENTER; |
7673 | 7683 | ||
7674 | ipr_remove_trace_file(&ioa_cfg->host->shost_classdev.kobj, | 7684 | ipr_remove_trace_file(&ioa_cfg->host->shost_dev.kobj, |
7675 | &ipr_trace_attr); | 7685 | &ipr_trace_attr); |
7676 | ipr_remove_dump_file(&ioa_cfg->host->shost_classdev.kobj, | 7686 | ipr_remove_dump_file(&ioa_cfg->host->shost_dev.kobj, |
7677 | &ipr_dump_attr); | 7687 | &ipr_dump_attr); |
7678 | scsi_remove_host(ioa_cfg->host); | 7688 | scsi_remove_host(ioa_cfg->host); |
7679 | 7689 | ||
@@ -7714,7 +7724,7 @@ static int __devinit ipr_probe(struct pci_dev *pdev, | |||
7714 | return rc; | 7724 | return rc; |
7715 | } | 7725 | } |
7716 | 7726 | ||
7717 | rc = ipr_create_trace_file(&ioa_cfg->host->shost_classdev.kobj, | 7727 | rc = ipr_create_trace_file(&ioa_cfg->host->shost_dev.kobj, |
7718 | &ipr_trace_attr); | 7728 | &ipr_trace_attr); |
7719 | 7729 | ||
7720 | if (rc) { | 7730 | if (rc) { |
@@ -7723,11 +7733,11 @@ static int __devinit ipr_probe(struct pci_dev *pdev, | |||
7723 | return rc; | 7733 | return rc; |
7724 | } | 7734 | } |
7725 | 7735 | ||
7726 | rc = ipr_create_dump_file(&ioa_cfg->host->shost_classdev.kobj, | 7736 | rc = ipr_create_dump_file(&ioa_cfg->host->shost_dev.kobj, |
7727 | &ipr_dump_attr); | 7737 | &ipr_dump_attr); |
7728 | 7738 | ||
7729 | if (rc) { | 7739 | if (rc) { |
7730 | ipr_remove_trace_file(&ioa_cfg->host->shost_classdev.kobj, | 7740 | ipr_remove_trace_file(&ioa_cfg->host->shost_dev.kobj, |
7731 | &ipr_trace_attr); | 7741 | &ipr_trace_attr); |
7732 | scsi_remove_host(ioa_cfg->host); | 7742 | scsi_remove_host(ioa_cfg->host); |
7733 | __ipr_remove(pdev); | 7743 | __ipr_remove(pdev); |