mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
kill DECLARE_MUTEX_LOCKED
DECLARE_MUTEX_LOCKED was used for semaphores used as completions and we've got rid of them. Well, except for one in libusual that the maintainer explicitly wants to keep as semaphore. So convert that useage to an explicit sema_init and kill of DECLARE_MUTEX_LOCKED so that new code is reminded to use a completion. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: "Satyam Sharma" <satyam.sharma@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4029a9177f
commit
04fc8bbcf5
24 changed files with 3 additions and 24 deletions
|
@ -30,7 +30,7 @@ static atomic_t usu_bias = ATOMIC_INIT(USB_US_DEFAULT_BIAS);
|
|||
#define BIAS_NAME_SIZE (sizeof("usb-storage"))
|
||||
static const char *bias_names[3] = { "none", "usb-storage", "ub" };
|
||||
|
||||
static DECLARE_MUTEX_LOCKED(usu_init_notify);
|
||||
static struct semaphore usu_init_notify;
|
||||
static DECLARE_COMPLETION(usu_end_notify);
|
||||
static atomic_t total_threads = ATOMIC_INIT(0);
|
||||
|
||||
|
@ -204,6 +204,8 @@ static int __init usb_usual_init(void)
|
|||
{
|
||||
int rc;
|
||||
|
||||
sema_init(&usu_init_notify, 0);
|
||||
|
||||
rc = usb_register(&usu_driver);
|
||||
up(&usu_init_notify);
|
||||
return rc;
|
||||
|
|
|
@ -30,7 +30,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init(struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INIT(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init(struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -36,7 +36,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init(struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init(struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name, count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name, 0)
|
||||
|
||||
static inline void
|
||||
sema_init (struct semaphore *sem, int val)
|
||||
|
|
|
@ -35,7 +35,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init(struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name, count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name, 0)
|
||||
|
||||
static inline void sema_init(struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -53,7 +53,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
extern inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name, 0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -33,7 +33,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name, 0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -22,7 +22,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER (name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC (name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC (name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -59,7 +59,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
|
@ -33,7 +33,6 @@ struct semaphore {
|
|||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||
|
||||
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
|
||||
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
|
||||
|
||||
static inline void sema_init (struct semaphore *sem, int val)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue