1 From 82f973442d7a7fe4b08b86aeccd11ac33ecf01d1 Mon Sep 17 00:00:00 2001
2 From: Gerald Van Baren <gvb@unssw.com>
3 Date: Tue, 25 Oct 2011 22:17:17 -0400
4 Subject: [PATCH] Fix deprecated/removed spinlock declaration
6 Signed-off-by: Gerald Van Baren <gvb@unssw.com>
9 1 files changed, 1 insertions(+), 2 deletions(-)
11 diff --git a/backfire.c b/backfire.c
12 index aaf9c4a..0e9a0df 100644
13 --- a/src/backfire/backfire.c
14 +++ b/src/backfire/backfire.c
16 #include <linux/sched.h>
17 #include <linux/cpumask.h>
18 #include <linux/time.h>
19 -#include <linux/smp_lock.h>
20 #include <linux/types.h>
21 #include <linux/errno.h>
22 #include <linux/miscdevice.h>
25 #define BACKFIRE_MINOR MISC_DYNAMIC_MINOR
27 -static spinlock_t backfire_state_lock = SPIN_LOCK_UNLOCKED;
28 +static DEFINE_SPINLOCK(backfire_state_lock);
29 static int backfire_open_cnt; /* #times opened */
30 static int backfire_open_mode; /* special open modes */
31 static struct timeval sendtime; /* when the most recent signal was sent */
35 Also <asm/system.h> is gone for most architectures since v3.4-rc1~54^2.
36 --- rt-tests-1.6/src/backfire/backfire.c.orig 2020-02-09 10:27:54.181066040 +0100
37 +++ rt-tests-1.6/src/backfire/backfire.c 2020-02-09 10:29:12.863973111 +0100
39 #include <linux/spinlock.h>
40 #include <linux/uaccess.h>
42 -#include <asm/system.h>
44 #define BACKFIRE_MINOR MISC_DYNAMIC_MINOR
46 static DEFINE_SPINLOCK(backfire_state_lock);