diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2008-01-18 15:32:53 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-01-25 06:52:53 -0500 |
commit | c4e6752dd4f249d6797146d655973bc0bde4c26e (patch) | |
tree | 367e45e12e94345d88081f58ad44ac233e97aadd | |
parent | 781749a46b34dc5c9e4000df7b9d37d675c17463 (diff) |
[POWERPC] PS3: Vuart: change semaphore to mutex
A general housekeeping change of the PS3 vuart variable
vuart_bus_priv.probe_mutex from semaphore to mutex.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | drivers/ps3/ps3-vuart.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/ps3/ps3-vuart.c b/drivers/ps3/ps3-vuart.c index a3e4ea9ae5b1..90c097a7a47a 100644 --- a/drivers/ps3/ps3-vuart.c +++ b/drivers/ps3/ps3-vuart.c | |||
@@ -877,7 +877,7 @@ static int ps3_vuart_handle_port_interrupt(struct ps3_system_bus_device *dev) | |||
877 | struct vuart_bus_priv { | 877 | struct vuart_bus_priv { |
878 | struct ports_bmp *bmp; | 878 | struct ports_bmp *bmp; |
879 | unsigned int virq; | 879 | unsigned int virq; |
880 | struct semaphore probe_mutex; | 880 | struct mutex probe_mutex; |
881 | int use_count; | 881 | int use_count; |
882 | struct ps3_system_bus_device *devices[PORT_COUNT]; | 882 | struct ps3_system_bus_device *devices[PORT_COUNT]; |
883 | } static vuart_bus_priv; | 883 | } static vuart_bus_priv; |
@@ -1015,7 +1015,7 @@ static int ps3_vuart_probe(struct ps3_system_bus_device *dev) | |||
1015 | return -EINVAL; | 1015 | return -EINVAL; |
1016 | } | 1016 | } |
1017 | 1017 | ||
1018 | down(&vuart_bus_priv.probe_mutex); | 1018 | mutex_lock(&vuart_bus_priv.probe_mutex); |
1019 | 1019 | ||
1020 | result = ps3_vuart_bus_interrupt_get(); | 1020 | result = ps3_vuart_bus_interrupt_get(); |
1021 | 1021 | ||
@@ -1075,7 +1075,7 @@ static int ps3_vuart_probe(struct ps3_system_bus_device *dev) | |||
1075 | goto fail_probe; | 1075 | goto fail_probe; |
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | up(&vuart_bus_priv.probe_mutex); | 1078 | mutex_unlock(&vuart_bus_priv.probe_mutex); |
1079 | 1079 | ||
1080 | return result; | 1080 | return result; |
1081 | 1081 | ||
@@ -1088,7 +1088,7 @@ fail_dev_malloc: | |||
1088 | fail_busy: | 1088 | fail_busy: |
1089 | ps3_vuart_bus_interrupt_put(); | 1089 | ps3_vuart_bus_interrupt_put(); |
1090 | fail_setup_interrupt: | 1090 | fail_setup_interrupt: |
1091 | up(&vuart_bus_priv.probe_mutex); | 1091 | mutex_unlock(&vuart_bus_priv.probe_mutex); |
1092 | dev_dbg(&dev->core, "%s:%d: failed\n", __func__, __LINE__); | 1092 | dev_dbg(&dev->core, "%s:%d: failed\n", __func__, __LINE__); |
1093 | return result; | 1093 | return result; |
1094 | } | 1094 | } |
@@ -1127,7 +1127,7 @@ static int ps3_vuart_remove(struct ps3_system_bus_device *dev) | |||
1127 | 1127 | ||
1128 | BUG_ON(!dev); | 1128 | BUG_ON(!dev); |
1129 | 1129 | ||
1130 | down(&vuart_bus_priv.probe_mutex); | 1130 | mutex_lock(&vuart_bus_priv.probe_mutex); |
1131 | 1131 | ||
1132 | dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__, | 1132 | dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__, |
1133 | dev->match_id); | 1133 | dev->match_id); |
@@ -1135,7 +1135,7 @@ static int ps3_vuart_remove(struct ps3_system_bus_device *dev) | |||
1135 | if (!dev->core.driver) { | 1135 | if (!dev->core.driver) { |
1136 | dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__, | 1136 | dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__, |
1137 | __LINE__); | 1137 | __LINE__); |
1138 | up(&vuart_bus_priv.probe_mutex); | 1138 | mutex_unlock(&vuart_bus_priv.probe_mutex); |
1139 | return 0; | 1139 | return 0; |
1140 | } | 1140 | } |
1141 | 1141 | ||
@@ -1158,7 +1158,7 @@ static int ps3_vuart_remove(struct ps3_system_bus_device *dev) | |||
1158 | priv = NULL; | 1158 | priv = NULL; |
1159 | 1159 | ||
1160 | dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__); | 1160 | dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__); |
1161 | up(&vuart_bus_priv.probe_mutex); | 1161 | mutex_unlock(&vuart_bus_priv.probe_mutex); |
1162 | return 0; | 1162 | return 0; |
1163 | } | 1163 | } |
1164 | 1164 | ||
@@ -1178,7 +1178,7 @@ static int ps3_vuart_shutdown(struct ps3_system_bus_device *dev) | |||
1178 | 1178 | ||
1179 | BUG_ON(!dev); | 1179 | BUG_ON(!dev); |
1180 | 1180 | ||
1181 | down(&vuart_bus_priv.probe_mutex); | 1181 | mutex_lock(&vuart_bus_priv.probe_mutex); |
1182 | 1182 | ||
1183 | dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__, | 1183 | dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__, |
1184 | dev->match_id); | 1184 | dev->match_id); |
@@ -1186,7 +1186,7 @@ static int ps3_vuart_shutdown(struct ps3_system_bus_device *dev) | |||
1186 | if (!dev->core.driver) { | 1186 | if (!dev->core.driver) { |
1187 | dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__, | 1187 | dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__, |
1188 | __LINE__); | 1188 | __LINE__); |
1189 | up(&vuart_bus_priv.probe_mutex); | 1189 | mutex_unlock(&vuart_bus_priv.probe_mutex); |
1190 | return 0; | 1190 | return 0; |
1191 | } | 1191 | } |
1192 | 1192 | ||
@@ -1210,7 +1210,7 @@ static int ps3_vuart_shutdown(struct ps3_system_bus_device *dev) | |||
1210 | 1210 | ||
1211 | dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__); | 1211 | dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__); |
1212 | 1212 | ||
1213 | up(&vuart_bus_priv.probe_mutex); | 1213 | mutex_unlock(&vuart_bus_priv.probe_mutex); |
1214 | return 0; | 1214 | return 0; |
1215 | } | 1215 | } |
1216 | 1216 | ||
@@ -1221,7 +1221,7 @@ static int __init ps3_vuart_bus_init(void) | |||
1221 | if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) | 1221 | if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) |
1222 | return -ENODEV; | 1222 | return -ENODEV; |
1223 | 1223 | ||
1224 | init_MUTEX(&vuart_bus_priv.probe_mutex); | 1224 | mutex_init(&vuart_bus_priv.probe_mutex); |
1225 | 1225 | ||
1226 | return 0; | 1226 | return 0; |
1227 | } | 1227 | } |