diff options
Diffstat (limited to 'drivers/s390/cio/ccwgroup.c')
-rw-r--r-- | drivers/s390/cio/ccwgroup.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index e7bd7f37f080..e849289d4f3c 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/s390/cio/ccwgroup.c | 2 | * drivers/s390/cio/ccwgroup.c |
3 | * bus driver for ccwgroup | 3 | * bus driver for ccwgroup |
4 | * $Revision: 1.32 $ | 4 | * $Revision: 1.33 $ |
5 | * | 5 | * |
6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, | 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, |
7 | * IBM Corporation | 7 | * IBM Corporation |
@@ -45,7 +45,7 @@ ccwgroup_bus_match (struct device * dev, struct device_driver * drv) | |||
45 | return 0; | 45 | return 0; |
46 | } | 46 | } |
47 | static int | 47 | static int |
48 | ccwgroup_hotplug (struct device *dev, char **envp, int num_envp, char *buffer, | 48 | ccwgroup_uevent (struct device *dev, char **envp, int num_envp, char *buffer, |
49 | int buffer_size) | 49 | int buffer_size) |
50 | { | 50 | { |
51 | /* TODO */ | 51 | /* TODO */ |
@@ -55,7 +55,7 @@ ccwgroup_hotplug (struct device *dev, char **envp, int num_envp, char *buffer, | |||
55 | static struct bus_type ccwgroup_bus_type = { | 55 | static struct bus_type ccwgroup_bus_type = { |
56 | .name = "ccwgroup", | 56 | .name = "ccwgroup", |
57 | .match = ccwgroup_bus_match, | 57 | .match = ccwgroup_bus_match, |
58 | .hotplug = ccwgroup_hotplug, | 58 | .uevent = ccwgroup_uevent, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static inline void | 61 | static inline void |
@@ -263,7 +263,7 @@ ccwgroup_set_online(struct ccwgroup_device *gdev) | |||
263 | struct ccwgroup_driver *gdrv; | 263 | struct ccwgroup_driver *gdrv; |
264 | int ret; | 264 | int ret; |
265 | 265 | ||
266 | if (atomic_compare_and_swap(0, 1, &gdev->onoff)) | 266 | if (atomic_cmpxchg(&gdev->onoff, 0, 1) != 0) |
267 | return -EAGAIN; | 267 | return -EAGAIN; |
268 | if (gdev->state == CCWGROUP_ONLINE) { | 268 | if (gdev->state == CCWGROUP_ONLINE) { |
269 | ret = 0; | 269 | ret = 0; |
@@ -289,7 +289,7 @@ ccwgroup_set_offline(struct ccwgroup_device *gdev) | |||
289 | struct ccwgroup_driver *gdrv; | 289 | struct ccwgroup_driver *gdrv; |
290 | int ret; | 290 | int ret; |
291 | 291 | ||
292 | if (atomic_compare_and_swap(0, 1, &gdev->onoff)) | 292 | if (atomic_cmpxchg(&gdev->onoff, 0, 1) != 0) |
293 | return -EAGAIN; | 293 | return -EAGAIN; |
294 | if (gdev->state == CCWGROUP_OFFLINE) { | 294 | if (gdev->state == CCWGROUP_OFFLINE) { |
295 | ret = 0; | 295 | ret = 0; |