History

V4L/DVB: staging/lirc: fix non-CONFIG_MODULES build horkage

Fix when CONFIG_MODULES is not enabled: drivers/staging/lirc/lirc_parallel.c:243: error: implicit declaration of function 'module_refcount' drivers/staging/lirc/lirc_it87.c:150: error: implicit declaration of function 'module_refcount' drivers/built-in.o: In function `it87_probe': lirc_it87.c:(.text+0x4079b0): undefined reference to `init_chrdev' lirc_it87.c:(.text+0x4079cc): undefined reference to `drop_chrdev' drivers/built-in.o: In function `lirc_it87_exit': lirc_it87.c:(.exit.text+0x38a5): undefined reference to `drop_chrdev' Its a quick hack and untested beyond building, since I don't have the hardware, but it should do the trick.

Jarod Wilson committed 16 years ago

Commit 82ce67b1 parent efce8ca2 files · +8 −5Browse files

Showing the changes to drivers/staging/lirc/lirc_parallel.c (1 of 2 files). Show all

Unified · Split

drivers/staging/lirc/lirc_parallel.c+2−2
@@ -240,7 +240,7 @@ static void irq_handler(void *blah) · 239 unmodified lines
240240 unsigned int level, newlevel;
241241 unsigned int timeout;
242242
243− if (!module_refcount(THIS_MODULE))
243+ if (!is_open)
244244 return;
245245
246246 if (!is_claimed)
@@ -515,7 +515,7 @@ static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) · 268 unmodified lines
515515
516516 static int lirc_open(struct inode *node, struct file *filep)
517517 {
518− if (module_refcount(THIS_MODULE) || !lirc_claim())
518+ if (is_open || !lirc_claim())
519519 return -EBUSY;
520520
521521 parport_enable_irq(pport);