Commit 9e1a1537 authored by Josh Hunt's avatar Josh Hunt Committed by James Bottomley

[SCSI] properly initialize atomic_t

Initialize atomic_t scsi_host_next_hn and ioerr_cntas per the guidelines
defined in Documentation/atomic_ops.txt
Signed-off-by: default avatarJosh Hunt <johunt@akamai.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent bb2c94a3
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment