Skip to content

Commit

Permalink
Import version 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansa89 committed May 11, 2016
1 parent 5fc17ae commit 9b9cf09
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
29 changes: 13 additions & 16 deletions Makefile
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)
14 changes: 11 additions & 3 deletions lcdtopgun.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()".
Expand Down Expand Up @@ -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 <chris@aegis-corp.org>"
#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);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 9b9cf09

Please sign in to comment.