From affe5c7c95eab8dd65c10631bb7435acbae8b1c4 Mon Sep 17 00:00:00 2001 From: smckown Date: Wed, 25 Nov 2009 20:10:53 +0000 Subject: [PATCH] Modify package so the resultant module is named cp210x instead of cp2101. This removes the ambiguity associated with the native kernel driver module name of cp2101. --- Makefile | 4 ++-- Makefile.dkms | 1 - README | 6 +++--- debian.in/prerm | 1 - src/Makefile | 2 +- src/Makefile.go | 6 +++--- src/Makefile24 | 2 +- src/Makefile26 | 4 ++-- src/{cp2101.c => cp210x.c} | 10 +++++----- 9 files changed, 17 insertions(+), 19 deletions(-) rename src/{cp2101.c => cp210x.c} (99%) diff --git a/Makefile b/Makefile index c05566d..acaa738 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ # Change or override these values as necessary for each package release -PKGVER = 0.11 +PKGVER = 0.11.1 DEBDIST = hardy -DEBRELEASE = 0tmi +DEBRELEASE = 1tmi # No need to change anything below this line diff --git a/Makefile.dkms b/Makefile.dkms index c84885b..b8de4d4 100755 --- a/Makefile.dkms +++ b/Makefile.dkms @@ -6,7 +6,6 @@ all: ./configure -kver $(KVER) test -f Makefile.config $(MAKE) -f Makefile.go - cp cp2101.ko cp210x.ko $(STRIP) cp210x.ko clean: diff --git a/README b/README index 0c1b0f7..da76bda 100644 --- a/README +++ b/README @@ -23,14 +23,14 @@ Build a .deb locally is quite a bit simpler and faster: * # To install locally, FIRST REMOVE all cp210x-module packages installed. Then, * sudo dpkg -i build/cp210x-module*.deb -The cp2101.ko file can be built and installed from the source directory as +The cp210x.ko file can be built and installed from the source directory as well, but this isn't recommended: * Check out the code * cd cp210x/src * ./configure -kver $(uname -r) * make -f Makefile.go all -* # The binary is called cp2101.ko +* # The binary is called cp210x.ko * # To install, * chmod a+x installmod * sudo make -f Makefile.go install @@ -39,7 +39,7 @@ well, but this isn't recommended: Older kernels are supported, but require one to check out the pre2.6.24 branch from the repo, then follow any of the steps above. You may have to -edit cp2101.c and replace: +edit cp210x.c and replace: #include "usb-serial.h" with: #include "/path/to/usb-serial.h" diff --git a/debian.in/prerm b/debian.in/prerm index d685190..e7a02ec 100755 --- a/debian.in/prerm +++ b/debian.in/prerm @@ -7,7 +7,6 @@ set -e case "$1" in remove|upgrade|deconfigure) - rmmod cp2101 2>/dev/null || true rmmod xxROOTNAMExx 2>/dev/null || true if [ "`dkms status -m $NAME`" ]; then dkms remove -m $NAME -v $VERSION --all diff --git a/src/Makefile b/src/Makefile index 5d5dbb8..4aa7c85 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,4 +1,4 @@ -# CP2101 Makefile +# CP210x Makefile ifeq ("$(src)", "") include Makefile.config diff --git a/src/Makefile.go b/src/Makefile.go index 407680c..90912fe 100644 --- a/src/Makefile.go +++ b/src/Makefile.go @@ -11,15 +11,15 @@ # mrproper - remove emacs debris # -OBJS = cp2101.o +OBJS = cp210x.o -SRC = cp2102.c +SRC = cp210x.c include ./Makefile.config KVER=$(KVER1).$(KVER2).$(KVER3) -MODULE=cp2101$(EXT) +MODULE=cp210x$(EXT) MODULES_DIR=$(INSTALL_PREFIX)/lib/modules MODULES_VER_DIR=$(MODULES_DIR)/$(KVER) diff --git a/src/Makefile24 b/src/Makefile24 index 4a19ad3..58cf9b6 100644 --- a/src/Makefile24 +++ b/src/Makefile24 @@ -2,6 +2,6 @@ EXTRA_CFLAGS += -I$(LINUX_KERNEL)/drivers/usb/serial -obj-m += cp2101.o +obj-m += cp210x.o include $(TOPDIR)/Rules.make diff --git a/src/Makefile26 b/src/Makefile26 index 2456377..a3b6425 100644 --- a/src/Makefile26 +++ b/src/Makefile26 @@ -2,6 +2,6 @@ EXTRA_CFLAGS += -I$(LINUX_INCLUDE) -I$(LINUX_KERNEL)/drivers/usb/serial -DLINUX26 -obj-m := cp2101.o +obj-m := cp210x.o -cp2101-objs := $(OBJS) +cp210x-objs := $(OBJS) diff --git a/src/cp2101.c b/src/cp210x.c similarity index 99% rename from src/cp2101.c rename to src/cp210x.c index 7ad61da..0df92df 100644 --- a/src/cp2101.c +++ b/src/cp210x.c @@ -36,7 +36,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v0.11rsm" +#define DRIVER_VERSION "v0.11tmi" #define DRIVER_DESC "Silicon Labs CP2101/CP2102/CP2103 RS232 serial adaptor driver" /* @@ -112,7 +112,7 @@ static struct usb_device_id id_table [] = { MODULE_DEVICE_TABLE (usb, id_table); static struct usb_driver cp2101_driver = { - .name = "cp2101", + .name = "cp210x", .probe = usb_serial_probe, .disconnect = usb_serial_disconnect, .id_table = id_table, @@ -122,7 +122,7 @@ static struct usb_driver cp2101_driver = { static struct usb_serial_driver cp2101_device = { .driver = { .owner = THIS_MODULE, - .name = "cp2101", + .name = "cp210x", }, .usb_driver = &cp2101_driver, .id_table = id_table, @@ -311,7 +311,7 @@ static int cp2101_ctlmsg(struct usb_serial_port* port, u8 request, } kfree(tbuf); if (ret < 0 && ret != -EPIPE) { - dev_printk(KERN_DEBUG, &dev->dev, "cp2101: control failed cmd rqt %u " + dev_printk(KERN_DEBUG, &dev->dev, "cp210x: control failed cmd rqt %u " "rq %u len %u ret %d\n", requestype, request, size, ret); } return ret; @@ -1100,7 +1100,7 @@ static void cp2101_set_termios (struct usb_serial_port *port, dbg("%s - data bits = 9", __FUNCTION__); break;*/ default: - dev_err(&port->dev, "cp2101 driver does not " + dev_err(&port->dev, "cp210x driver does not " "support the number of bits requested," " using 8 bit mode\n"); bits |= BITS_DATA_8; -- 2.39.2