Commit c4e6752dd4f249d6797146d655973bc0bde4c26e
Committed by
Paul Mackerras
1 parent
781749a46b
Exists in
master
and in
4 other branches
[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>
Showing 1 changed file with 11 additions and 11 deletions Side-by-side Diff
drivers/ps3/ps3-vuart.c
... | ... | @@ -877,7 +877,7 @@ |
877 | 877 | struct vuart_bus_priv { |
878 | 878 | struct ports_bmp *bmp; |
879 | 879 | unsigned int virq; |
880 | - struct semaphore probe_mutex; | |
880 | + struct mutex probe_mutex; | |
881 | 881 | int use_count; |
882 | 882 | struct ps3_system_bus_device *devices[PORT_COUNT]; |
883 | 883 | } static vuart_bus_priv; |
... | ... | @@ -1015,7 +1015,7 @@ |
1015 | 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 | 1020 | result = ps3_vuart_bus_interrupt_get(); |
1021 | 1021 | |
... | ... | @@ -1075,7 +1075,7 @@ |
1075 | 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 | 1080 | return result; |
1081 | 1081 | |
... | ... | @@ -1088,7 +1088,7 @@ |
1088 | 1088 | fail_busy: |
1089 | 1089 | ps3_vuart_bus_interrupt_put(); |
1090 | 1090 | fail_setup_interrupt: |
1091 | - up(&vuart_bus_priv.probe_mutex); | |
1091 | + mutex_unlock(&vuart_bus_priv.probe_mutex); | |
1092 | 1092 | dev_dbg(&dev->core, "%s:%d: failed\n", __func__, __LINE__); |
1093 | 1093 | return result; |
1094 | 1094 | } |
... | ... | @@ -1127,7 +1127,7 @@ |
1127 | 1127 | |
1128 | 1128 | BUG_ON(!dev); |
1129 | 1129 | |
1130 | - down(&vuart_bus_priv.probe_mutex); | |
1130 | + mutex_lock(&vuart_bus_priv.probe_mutex); | |
1131 | 1131 | |
1132 | 1132 | dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__, |
1133 | 1133 | dev->match_id); |
... | ... | @@ -1135,7 +1135,7 @@ |
1135 | 1135 | if (!dev->core.driver) { |
1136 | 1136 | dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__, |
1137 | 1137 | __LINE__); |
1138 | - up(&vuart_bus_priv.probe_mutex); | |
1138 | + mutex_unlock(&vuart_bus_priv.probe_mutex); | |
1139 | 1139 | return 0; |
1140 | 1140 | } |
1141 | 1141 | |
... | ... | @@ -1158,7 +1158,7 @@ |
1158 | 1158 | priv = NULL; |
1159 | 1159 | |
1160 | 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 | 1162 | return 0; |
1163 | 1163 | } |
1164 | 1164 | |
... | ... | @@ -1178,7 +1178,7 @@ |
1178 | 1178 | |
1179 | 1179 | BUG_ON(!dev); |
1180 | 1180 | |
1181 | - down(&vuart_bus_priv.probe_mutex); | |
1181 | + mutex_lock(&vuart_bus_priv.probe_mutex); | |
1182 | 1182 | |
1183 | 1183 | dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__, |
1184 | 1184 | dev->match_id); |
... | ... | @@ -1186,7 +1186,7 @@ |
1186 | 1186 | if (!dev->core.driver) { |
1187 | 1187 | dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__, |
1188 | 1188 | __LINE__); |
1189 | - up(&vuart_bus_priv.probe_mutex); | |
1189 | + mutex_unlock(&vuart_bus_priv.probe_mutex); | |
1190 | 1190 | return 0; |
1191 | 1191 | } |
1192 | 1192 | |
... | ... | @@ -1210,7 +1210,7 @@ |
1210 | 1210 | |
1211 | 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 | 1214 | return 0; |
1215 | 1215 | } |
1216 | 1216 | |
... | ... | @@ -1221,7 +1221,7 @@ |
1221 | 1221 | if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) |
1222 | 1222 | return -ENODEV; |
1223 | 1223 | |
1224 | - init_MUTEX(&vuart_bus_priv.probe_mutex); | |
1224 | + mutex_init(&vuart_bus_priv.probe_mutex); | |
1225 | 1225 | |
1226 | 1226 | return 0; |
1227 | 1227 | } |