* Written by Miles Bader <miles@gnu.org>
*/
-#include <linux/config.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/fs.h>
static unsigned char leds_image[LED_NUM_DIGITS] = { 0 };
/* Spinlock protecting the above leds. */
-static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(leds_lock);
/* Common body of LED read/write functions, checks POS and LEN for
correctness, declares a variable using IMG_DECL, initialized pointing at
len = LED_NUM_DIGITS - pos; \
\
if (len > 0) { \
- int _flags; \
+ unsigned long _flags; \
const char *_end = buf + len; \
img_decl = &leds_image[pos]; \
\