aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJosh Hunt <johunt@akamai.com>2012-06-09 10:03:39 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-07-20 03:58:36 -0400
commit9e1a15376bce2fc7746145eb8ee78a3674658bc8 (patch)
tree81f23f7fc1152a4386814dfc443129cc5f7e1de2 /drivers
parentbb2c94a3a6ad37fe7d34f369295bcdf5387e264f (diff)
[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: Josh Hunt <johunt@akamai.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/hosts.c2
-rw-r--r--drivers/scsi/sd.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index a3a056a9db6..2b6a03de578 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -42,7 +42,7 @@
42#include "scsi_logging.h" 42#include "scsi_logging.h"
43 43
44 44
45static atomic_t scsi_host_next_hn; /* host_no for next new host */ 45static atomic_t scsi_host_next_hn = ATOMIC_INIT(0); /* host_no for next new host */
46 46
47 47
48static void scsi_host_cls_release(struct device *dev) 48static void scsi_host_cls_release(struct device *dev)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 6f72b80121a..6e26db11250 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2704,6 +2704,7 @@ static int sd_probe(struct device *dev)
2704 sdkp->disk = gd; 2704 sdkp->disk = gd;
2705 sdkp->index = index; 2705 sdkp->index = index;
2706 atomic_set(&sdkp->openers, 0); 2706 atomic_set(&sdkp->openers, 0);
2707 atomic_set(&sdkp->device->ioerr_cnt, 0);
2707 2708
2708 if (!sdp->request_queue->rq_timeout) { 2709 if (!sdp->request_queue->rq_timeout) {
2709 if (sdp->type != TYPE_MOD) 2710 if (sdp->type != TYPE_MOD)