Skip to content

Commit bbd1ae4

Browse files
hreineckejejb
authored andcommitted
[SCSI] qla2xxx, lfpc: Rename 'state' attribute to 'link_state'
lpfc and qla2xxx overwrite the standard 'state' attribute with custom callbacks. So rename the custom attributes to 'link_state' and retain the original meaning of the 'state' attribute. Signed-off-by: Hannes Reinecke <hare@suse.de> Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Acked-by: James Smart <James.Smart@Emulex.Com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 parent b0ed433 commit bbd1ae4

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎drivers/scsi/lpfc/lpfc_attr.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ lpfc_option_rom_version_show(struct device *dev, struct device_attribute *attr,
182182
return snprintf(buf, PAGE_SIZE, "%s\n", phba->OptionROMVersion);
183183
}
184184
static ssize_t
185-
lpfc_state_show(struct device *dev, struct device_attribute *attr,
186-
char *buf)
185+
lpfc_link_state_show(struct device *dev, struct device_attribute *attr,
186+
char *buf)
187187
{
188188
struct Scsi_Host *shost = class_to_shost(dev);
189189
struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
@@ -936,7 +936,7 @@ static DEVICE_ATTR(programtype, S_IRUGO, lpfc_programtype_show, NULL);
936936
static DEVICE_ATTR(portnum, S_IRUGO, lpfc_vportnum_show, NULL);
937937
static DEVICE_ATTR(fwrev, S_IRUGO, lpfc_fwrev_show, NULL);
938938
static DEVICE_ATTR(hdw, S_IRUGO, lpfc_hdw_show, NULL);
939-
static DEVICE_ATTR(state, S_IRUGO, lpfc_state_show, NULL);
939+
static DEVICE_ATTR(link_state, S_IRUGO, lpfc_link_state_show, NULL);
940940
static DEVICE_ATTR(option_rom_version, S_IRUGO,
941941
lpfc_option_rom_version_show, NULL);
942942
static DEVICE_ATTR(num_discovered_ports, S_IRUGO,
@@ -1666,7 +1666,7 @@ struct device_attribute *lpfc_hba_attrs[] = {
16661666
&dev_attr_fwrev,
16671667
&dev_attr_hdw,
16681668
&dev_attr_option_rom_version,
1669-
&dev_attr_state,
1669+
&dev_attr_link_state,
16701670
&dev_attr_num_discovered_ports,
16711671
&dev_attr_lpfc_drvr_version,
16721672
&dev_attr_lpfc_temp_sensor,
@@ -1714,7 +1714,7 @@ struct device_attribute *lpfc_hba_attrs[] = {
17141714

17151715
struct device_attribute *lpfc_vport_attrs[] = {
17161716
&dev_attr_info,
1717-
&dev_attr_state,
1717+
&dev_attr_link_state,
17181718
&dev_attr_num_discovered_ports,
17191719
&dev_attr_lpfc_drvr_version,
17201720
&dev_attr_lpfc_log_verbose,

‎drivers/scsi/qla2xxx/qla_attr.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,8 @@ qla2x00_pci_info_show(struct device *dev, struct device_attribute *attr,
609609
}
610610

611611
static ssize_t
612-
qla2x00_state_show(struct device *dev, struct device_attribute *attr,
613-
char *buf)
612+
qla2x00_link_state_show(struct device *dev, struct device_attribute *attr,
613+
char *buf)
614614
{
615615
scsi_qla_host_t *ha = shost_priv(class_to_shost(dev));
616616
int len = 0;
@@ -814,7 +814,7 @@ static DEVICE_ATTR(isp_id, S_IRUGO, qla2x00_isp_id_show, NULL);
814814
static DEVICE_ATTR(model_name, S_IRUGO, qla2x00_model_name_show, NULL);
815815
static DEVICE_ATTR(model_desc, S_IRUGO, qla2x00_model_desc_show, NULL);
816816
static DEVICE_ATTR(pci_info, S_IRUGO, qla2x00_pci_info_show, NULL);
817-
static DEVICE_ATTR(state, S_IRUGO, qla2x00_state_show, NULL);
817+
static DEVICE_ATTR(link_state, S_IRUGO, qla2x00_link_state_show, NULL);
818818
static DEVICE_ATTR(zio, S_IRUGO | S_IWUSR, qla2x00_zio_show, qla2x00_zio_store);
819819
static DEVICE_ATTR(zio_timer, S_IRUGO | S_IWUSR, qla2x00_zio_timer_show,
820820
qla2x00_zio_timer_store);
@@ -838,7 +838,7 @@ struct device_attribute *qla2x00_host_attrs[] = {
838838
&dev_attr_model_name,
839839
&dev_attr_model_desc,
840840
&dev_attr_pci_info,
841-
&dev_attr_state,
841+
&dev_attr_link_state,
842842
&dev_attr_zio,
843843
&dev_attr_zio_timer,
844844
&dev_attr_beacon,

0 commit comments

Comments
 (0)