summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_init.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-12-19 17:02:25 -0800
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 13:47:29 -0600
commitf8daa6e6d83f60a721752cb53433bfdc1503b45f (patch)
tree66798b2d2763a53acada47040c86f7c094430f0a /drivers/scsi/libsas/sas_init.c
parentb15ebe0b5d0b95aeb1d84cae3649df1e0e065e9b (diff)
downloadop-kernel-dev-f8daa6e6d83f60a721752cb53433bfdc1503b45f.zip
op-kernel-dev-f8daa6e6d83f60a721752cb53433bfdc1503b45f.tar.gz
[SCSI] libsas: convert ha->state to flags
In preparation for adding new states (SAS_HA_DRAINING, SAS_HA_FROZEN), convert ha->state into a set of flags. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_init.c')
-rw-r--r--drivers/scsi/libsas/sas_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c
index a435876..da244e6 100644
--- a/drivers/scsi/libsas/sas_init.c
+++ b/drivers/scsi/libsas/sas_init.c
@@ -112,7 +112,7 @@ int sas_register_ha(struct sas_ha_struct *sas_ha)
else if (sas_ha->lldd_queue_size == -1)
sas_ha->lldd_queue_size = 128; /* Sanity */
- sas_ha->state = SAS_HA_REGISTERED;
+ set_bit(SAS_HA_REGISTERED, &sas_ha->state);
spin_lock_init(&sas_ha->state_lock);
error = sas_register_phys(sas_ha);
@@ -160,7 +160,7 @@ int sas_unregister_ha(struct sas_ha_struct *sas_ha)
/* Set the state to unregistered to avoid further
* events to be queued */
spin_lock_irqsave(&sas_ha->state_lock, flags);
- sas_ha->state = SAS_HA_UNREGISTERED;
+ clear_bit(SAS_HA_REGISTERED, &sas_ha->state);
spin_unlock_irqrestore(&sas_ha->state_lock, flags);
scsi_flush_work(sas_ha->core.shost);
OpenPOWER on IntegriCloud