aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libsas/sas_init.c')
-rw-r--r--drivers/scsi/libsas/sas_init.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c
index 120bff64be30..10cb5ae30977 100644
--- a/drivers/scsi/libsas/sas_init.c
+++ b/drivers/scsi/libsas/sas_init.c
@@ -94,8 +94,7 @@ void sas_hash_addr(u8 *hashed, const u8 *sas_addr)
94 94
95void sas_hae_reset(struct work_struct *work) 95void sas_hae_reset(struct work_struct *work)
96{ 96{
97 struct sas_ha_event *ev = 97 struct sas_ha_event *ev = to_sas_ha_event(work);
98 container_of(work, struct sas_ha_event, work);
99 struct sas_ha_struct *ha = ev->ha; 98 struct sas_ha_struct *ha = ev->ha;
100 99
101 clear_bit(HAE_RESET, &ha->pending); 100 clear_bit(HAE_RESET, &ha->pending);
@@ -369,14 +368,14 @@ static void sas_phy_release(struct sas_phy *phy)
369 368
370static void phy_reset_work(struct work_struct *work) 369static void phy_reset_work(struct work_struct *work)
371{ 370{
372 struct sas_phy_data *d = container_of(work, typeof(*d), reset_work); 371 struct sas_phy_data *d = container_of(work, typeof(*d), reset_work.work);
373 372
374 d->reset_result = transport_sas_phy_reset(d->phy, d->hard_reset); 373 d->reset_result = transport_sas_phy_reset(d->phy, d->hard_reset);
375} 374}
376 375
377static void phy_enable_work(struct work_struct *work) 376static void phy_enable_work(struct work_struct *work)
378{ 377{
379 struct sas_phy_data *d = container_of(work, typeof(*d), enable_work); 378 struct sas_phy_data *d = container_of(work, typeof(*d), enable_work.work);
380 379
381 d->enable_result = sas_phy_enable(d->phy, d->enable); 380 d->enable_result = sas_phy_enable(d->phy, d->enable);
382} 381}
@@ -389,8 +388,8 @@ static int sas_phy_setup(struct sas_phy *phy)
389 return -ENOMEM; 388 return -ENOMEM;
390 389
391 mutex_init(&d->event_lock); 390 mutex_init(&d->event_lock);
392 INIT_WORK(&d->reset_work, phy_reset_work); 391 INIT_SAS_WORK(&d->reset_work, phy_reset_work);
393 INIT_WORK(&d->enable_work, phy_enable_work); 392 INIT_SAS_WORK(&d->enable_work, phy_enable_work);
394 d->phy = phy; 393 d->phy = phy;
395 phy->hostdata = d; 394 phy->hostdata = d;
396 395