diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2012-09-04 13:36:41 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-26 09:45:09 -0400 |
commit | c3e6d407c0c09fb46a391bdd0a28827472825de7 (patch) | |
tree | e81b40186f8224dd0e8f62f77c29d445d91e5873 /drivers/s390/block | |
parent | 50ab9a9a60fc83b8e8db36b54f365226e2b139ac (diff) |
s390/scm: remove superfluous lock
Remove the spinlock from struct scm_device. drvdata and attributes
are guarded via device_lock.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r-- | drivers/s390/block/scm_drv.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/s390/block/scm_drv.c b/drivers/s390/block/scm_drv.c index fce711a63060..349966f6fc52 100644 --- a/drivers/s390/block/scm_drv.c +++ b/drivers/s390/block/scm_drv.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 9 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/spinlock.h> | ||
13 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
14 | #include <asm/eadm.h> | 13 | #include <asm/eadm.h> |
15 | #include "scm_blk.h" | 14 | #include "scm_blk.h" |
@@ -37,15 +36,10 @@ static int scm_probe(struct scm_device *scmdev) | |||
37 | if (!bdev) | 36 | if (!bdev) |
38 | return -ENOMEM; | 37 | return -ENOMEM; |
39 | 38 | ||
40 | spin_lock_irq(&scmdev->lock); | ||
41 | dev_set_drvdata(&scmdev->dev, bdev); | 39 | dev_set_drvdata(&scmdev->dev, bdev); |
42 | spin_unlock_irq(&scmdev->lock); | ||
43 | |||
44 | ret = scm_blk_dev_setup(bdev, scmdev); | 40 | ret = scm_blk_dev_setup(bdev, scmdev); |
45 | if (ret) { | 41 | if (ret) { |
46 | spin_lock_irq(&scmdev->lock); | ||
47 | dev_set_drvdata(&scmdev->dev, NULL); | 42 | dev_set_drvdata(&scmdev->dev, NULL); |
48 | spin_unlock_irq(&scmdev->lock); | ||
49 | kfree(bdev); | 43 | kfree(bdev); |
50 | goto out; | 44 | goto out; |
51 | } | 45 | } |
@@ -56,12 +50,9 @@ out: | |||
56 | 50 | ||
57 | static int scm_remove(struct scm_device *scmdev) | 51 | static int scm_remove(struct scm_device *scmdev) |
58 | { | 52 | { |
59 | struct scm_blk_dev *bdev; | 53 | struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev); |
60 | 54 | ||
61 | spin_lock_irq(&scmdev->lock); | ||
62 | bdev = dev_get_drvdata(&scmdev->dev); | ||
63 | dev_set_drvdata(&scmdev->dev, NULL); | 55 | dev_set_drvdata(&scmdev->dev, NULL); |
64 | spin_unlock_irq(&scmdev->lock); | ||
65 | scm_blk_dev_cleanup(bdev); | 56 | scm_blk_dev_cleanup(bdev); |
66 | kfree(bdev); | 57 | kfree(bdev); |
67 | 58 | ||