Loading drivers/sbus/char/flash.c +5 −1 Original line number Original line Diff line number Diff line Loading @@ -127,9 +127,13 @@ flash_read(struct file * file, char __user * buf, static int static int flash_open(struct inode *inode, struct file *file) flash_open(struct inode *inode, struct file *file) { { if (test_and_set_bit(0, (void *)&flash.busy) != 0) lock_kernel(); if (test_and_set_bit(0, (void *)&flash.busy) != 0) { unlock_kernel(); return -EBUSY; return -EBUSY; } unlock_kernel(); return 0; return 0; } } Loading Loading
drivers/sbus/char/flash.c +5 −1 Original line number Original line Diff line number Diff line Loading @@ -127,9 +127,13 @@ flash_read(struct file * file, char __user * buf, static int static int flash_open(struct inode *inode, struct file *file) flash_open(struct inode *inode, struct file *file) { { if (test_and_set_bit(0, (void *)&flash.busy) != 0) lock_kernel(); if (test_and_set_bit(0, (void *)&flash.busy) != 0) { unlock_kernel(); return -EBUSY; return -EBUSY; } unlock_kernel(); return 0; return 0; } } Loading