aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2012-09-04 13:36:41 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-26 09:45:09 -0400
commitc3e6d407c0c09fb46a391bdd0a28827472825de7 (patch)
treee81b40186f8224dd0e8f62f77c29d445d91e5873 /drivers/s390/cio
parent50ab9a9a60fc83b8e8db36b54f365226e2b139ac (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/cio')
-rw-r--r--drivers/s390/cio/scm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/cio/scm.c b/drivers/s390/cio/scm.c
index aa4476e92050..bcf20f3aa51b 100644
--- a/drivers/s390/cio/scm.c
+++ b/drivers/s390/cio/scm.c
@@ -5,7 +5,6 @@
5 * Author(s): Sebastian Ott <sebott@linux.vnet.ibm.com> 5 * Author(s): Sebastian Ott <sebott@linux.vnet.ibm.com>
6 */ 6 */
7 7
8#include <linux/spinlock.h>
9#include <linux/device.h> 8#include <linux/device.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/mutex.h> 10#include <linux/mutex.h>
@@ -134,9 +133,9 @@ static ssize_t show_##name(struct device *dev, \
134 struct scm_device *scmdev = to_scm_dev(dev); \ 133 struct scm_device *scmdev = to_scm_dev(dev); \
135 int ret; \ 134 int ret; \
136 \ 135 \
137 spin_lock(&scmdev->lock); \ 136 device_lock(dev); \
138 ret = sprintf(buf, "%u\n", scmdev->attrs.name); \ 137 ret = sprintf(buf, "%u\n", scmdev->attrs.name); \
139 spin_unlock(&scmdev->lock); \ 138 device_unlock(dev); \
140 \ 139 \
141 return ret; \ 140 return ret; \
142} \ 141} \
@@ -193,7 +192,6 @@ static void scmdev_setup(struct scm_device *scmdev, struct sale *sale,
193 scmdev->dev.bus = &scm_bus_type; 192 scmdev->dev.bus = &scm_bus_type;
194 scmdev->dev.release = scmdev_release; 193 scmdev->dev.release = scmdev_release;
195 scmdev->dev.groups = scmdev_attr_groups; 194 scmdev->dev.groups = scmdev_attr_groups;
196 spin_lock_init(&scmdev->lock);
197} 195}
198 196
199/* 197/*