diff options
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_mbox.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index d20c2e4ee793..14f930d27ca1 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -305,20 +305,23 @@ static struct pci_driver megaraid_pci_driver = { static DEVICE_ATTR_ADMIN_RO(megaraid_mbox_app_hndl); // Host template initializer for megaraid mbox sysfs device attributes -static struct device_attribute *megaraid_shost_attrs[] = { - &dev_attr_megaraid_mbox_app_hndl, +static struct attribute *megaraid_shost_attrs[] = { + &dev_attr_megaraid_mbox_app_hndl.attr, NULL, }; +ATTRIBUTE_GROUPS(megaraid_shost); static DEVICE_ATTR_ADMIN_RO(megaraid_mbox_ld); // Host template initializer for megaraid mbox sysfs device attributes -static struct device_attribute *megaraid_sdev_attrs[] = { - &dev_attr_megaraid_mbox_ld, +static struct attribute *megaraid_sdev_attrs[] = { + &dev_attr_megaraid_mbox_ld.attr, NULL, }; +ATTRIBUTE_GROUPS(megaraid_sdev); + /* * Scsi host template for megaraid unified driver */ @@ -331,8 +334,8 @@ static struct scsi_host_template megaraid_template_g = { .eh_host_reset_handler = megaraid_reset_handler, .change_queue_depth = scsi_change_queue_depth, .no_write_same = 1, - .sdev_attrs = megaraid_sdev_attrs, - .shost_attrs = megaraid_shost_attrs, + .sdev_groups = megaraid_sdev_groups, + .shost_groups = megaraid_shost_groups, }; @@ -1432,15 +1435,14 @@ mbox_post_cmd(adapter_t *adapter, scb_t *scb) * * Queue entry point for mailbox based controllers. */ -static int -megaraid_queue_command_lck(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *)) +static int megaraid_queue_command_lck(struct scsi_cmnd *scp) { + void (*done)(struct scsi_cmnd *) = scsi_done; adapter_t *adapter; scb_t *scb; int if_busy; adapter = SCP2ADAPTER(scp); - scp->scsi_done = done; scp->result = 0; /* @@ -2358,7 +2360,7 @@ megaraid_mbox_dpc(unsigned long devp) megaraid_dealloc_scb(adapter, scb); // send the scsi packet back to kernel - scp->scsi_done(scp); + scsi_done(scp); } return; @@ -2416,7 +2418,7 @@ megaraid_abort_handler(struct scsi_cmnd *scp) scb->sno, scb->dev_channel, scb->dev_target)); scp->result = (DID_ABORT << 16); - scp->scsi_done(scp); + scsi_done(scp); megaraid_dealloc_scb(adapter, scb); @@ -2446,7 +2448,7 @@ megaraid_abort_handler(struct scsi_cmnd *scp) scb->dev_channel, scb->dev_target)); scp->result = (DID_ABORT << 16); - scp->scsi_done(scp); + scsi_done(scp); megaraid_dealloc_scb(adapter, scb); @@ -2566,7 +2568,7 @@ megaraid_reset_handler(struct scsi_cmnd *scp) } scb->scp->result = (DID_RESET << 16); - scb->scp->scsi_done(scb->scp); + scsi_done(scb->scp); megaraid_dealloc_scb(adapter, scb); } |