summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2012-03-11 08:28:46 +0100
committerJeff Garzik <jgarzik@redhat.com>2012-04-12 21:57:51 +0200
commit85d6725b7c0d7e3fa4261fdd4c020be4224fc9f1 (patch)
tree359e39a0982124c9f630ff3928aaf6f75d8b7dd3 /drivers/ata/libata.h
parentsata_mv: silence an uninitialized variable warning (diff)
downloadlinux-85d6725b7c0d7e3fa4261fdd4c020be4224fc9f1.tar.xz
linux-85d6725b7c0d7e3fa4261fdd4c020be4224fc9f1.zip
libata: make ata_print_id atomic
This variable is incremented from multiple contexts (module_init via libata-lldds and the libsas discovery thread). Make it atomic to head off any chance of libsas and libata creating duplicate ids. Acked-by: Jacek Danecki <jacek.danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r--drivers/ata/libata.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 2e26fcaf635b..9d0fd0b71852 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -53,7 +53,7 @@ enum {
ATA_DNXFER_QUIET = (1 << 31),
};
-extern unsigned int ata_print_id;
+extern atomic_t ata_print_id;
extern int atapi_passthru16;
extern int libata_fua;
extern int libata_noacpi;