diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2012-09-04 19:36:41 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-26 15:45:09 +0200 |
commit | c3e6d407c0c09fb46a391bdd0a28827472825de7 (patch) | |
tree | e81b40186f8224dd0e8f62f77c29d445d91e5873 /drivers/s390/block/scm_drv.c | |
parent | 50ab9a9a60fc83b8e8db36b54f365226e2b139ac (diff) | |
download | linux-c3e6d407c0c09fb46a391bdd0a28827472825de7.tar.bz2 |
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/scm_drv.c')
-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 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include <linux/module.h> -#include <linux/spinlock.h> #include <linux/slab.h> #include <asm/eadm.h> #include "scm_blk.h" @@ -37,15 +36,10 @@ static int scm_probe(struct scm_device *scmdev) if (!bdev) return -ENOMEM; - spin_lock_irq(&scmdev->lock); dev_set_drvdata(&scmdev->dev, bdev); - spin_unlock_irq(&scmdev->lock); - ret = scm_blk_dev_setup(bdev, scmdev); if (ret) { - spin_lock_irq(&scmdev->lock); dev_set_drvdata(&scmdev->dev, NULL); - spin_unlock_irq(&scmdev->lock); kfree(bdev); goto out; } @@ -56,12 +50,9 @@ out: static int scm_remove(struct scm_device *scmdev) { - struct scm_blk_dev *bdev; + struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev); - spin_lock_irq(&scmdev->lock); - bdev = dev_get_drvdata(&scmdev->dev); dev_set_drvdata(&scmdev->dev, NULL); - spin_unlock_irq(&scmdev->lock); scm_blk_dev_cleanup(bdev); kfree(bdev); |