-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
TOPDIR := /usr/src/linux | ||
MOD_ROOT := | ||
PWD := $(shell pwd) | ||
PWD := $(shell pwd) | ||
KVER ?= $(shell uname -r) | ||
KDIR := /lib/modules/$(KVER)/build | ||
obj-m := lcdtopgun.o | ||
|
||
obj-m := lcdtopgun.o | ||
lcdtopgun.ko: | ||
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules | ||
|
||
default: | ||
$(MAKE) -C $(TOPDIR) SUBDIRS=$(PWD) modules | ||
.PHONY: all clean install | ||
|
||
clean: | ||
rm -f lcdtopgun.o lcdtopgun.ko | ||
rm -f lcdtopgun.mod.c lcdtopgun.mod.o | ||
rm -f Module.symvers | ||
rm -f modules.order | ||
rm -f .lcdtopgun* | ||
rm -fr .tmp_versions | ||
all: lcdtopgun.ko | ||
|
||
install: | ||
$(MAKE) -C $(TOPDIR) SUBDIRS=$(PWD) modules_install | ||
depmod -ae | ||
clean: | ||
$(MAKE) -C $(KDIR) M=$(PWD) clean | ||
|
||
install: lcdtopgun.ko | ||
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install | ||
depmod -F$(KDIR)/System.map -ae $(KVER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,10 @@ | |
* | ||
* History: | ||
* | ||
* 2012-07-24 - 0.3.2: (Ansa89) Add "err" macro | ||
* - Added the "err" macro since it was missing on linux 3.5. | ||
* - Tested up to linux kernel 3.5. | ||
* | ||
* 2011-11-30 - 0.3.1: (Ansa89) Fix "info" macro | ||
* - Rewrote the "info" macro (for aesthetics reasons). | ||
* - Use "printk" instead of "info" in "usb_topgun_init()". | ||
|
@@ -62,15 +66,18 @@ MODULE_PARM_DESC(debug, "Debugging"); | |
/* | ||
* Version Information | ||
*/ | ||
#define DRIVER_VERSION "v0.3.1" | ||
#define DRIVER_VERSION "v0.3.2" | ||
#define DRIVER_AUTHOR "Christophe Thibault <[email protected]>" | ||
#define DRIVER_DESC "USB EMS LCD TopGun driver" | ||
#define DRIVER_LICENSE "GPL" | ||
|
||
/* | ||
* Missing macro (at least on linux >= 3.0) | ||
* Missing macro (at least on linux >= 3.5) | ||
*/ | ||
#define info(format, arg...) printk(KERN_INFO format "\n" , ## arg) | ||
#define info(format, arg...) \ | ||
printk(KERN_INFO format "\n" , ## arg) | ||
#define err(format, arg...) \ | ||
printk(KERN_ERR KBUILD_MODNAME ": " format "\n", ##arg) | ||
|
||
MODULE_AUTHOR(DRIVER_AUTHOR); | ||
MODULE_DESCRIPTION(DRIVER_DESC); | ||
|
@@ -344,6 +351,7 @@ static int __init usb_topgun_init(void) | |
{ | ||
int retval = usb_register(&usb_topgun_driver); | ||
if (retval == 0) | ||
// info(DRIVER_DESC " " DRIVER_VERSION " initialized" ); | ||
printk(KERN_INFO "%s: " DRIVER_DESC " " DRIVER_VERSION " initialized\n" , usb_topgun_driver.name); | ||
return retval; | ||
} | ||
|