Skip to content

Commit

Permalink
[SCSI] properly initialize atomic_t
Browse files Browse the repository at this point in the history
Initialize atomic_t scsi_host_next_hn and ioerr_cntas per the guidelines
defined in Documentation/atomic_ops.txt

Signed-off-by: Josh Hunt <johunt@akamai.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Josh Hunt authored and James Bottomley committed Jul 20, 2012
1 parent bb2c94a commit 9e1a153
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/hosts.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "scsi_logging.h"


static atomic_t scsi_host_next_hn; /* host_no for next new host */
static atomic_t scsi_host_next_hn = ATOMIC_INIT(0); /* host_no for next new host */


static void scsi_host_cls_release(struct device *dev)
Expand Down
1 change: 1 addition & 0 deletions drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2704,6 +2704,7 @@ static int sd_probe(struct device *dev)
sdkp->disk = gd;
sdkp->index = index;
atomic_set(&sdkp->openers, 0);
atomic_set(&sdkp->device->ioerr_cnt, 0);

if (!sdp->request_queue->rq_timeout) {
if (sdp->type != TYPE_MOD)
Expand Down

0 comments on commit 9e1a153

Please sign in to comment.