[zaptel-commits] kpfleming: branch 1.4 r2111 - in /branches/1.4: ./
Makefile xpp/xbus-core.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Wed Feb 7 13:36:53 MST 2007
Author: kpfleming
Date: Wed Feb 7 14:36:52 2007
New Revision: 2111
URL: http://svn.digium.com/view/zaptel?view=rev&rev=2111
Log:
Merged revisions 2110 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2
........
r2110 | kpfleming | 2007-02-07 14:29:22 -0600 (Wed, 07 Feb 2007) | 3 lines
build XPP on the kernels that Xorcom says are OK to build on
update workqueue usage to conform to kernel 2.6.20 API
........
Modified:
branches/1.4/ (props changed)
branches/1.4/Makefile
branches/1.4/xpp/xbus-core.c
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.4/Makefile?view=diff&rev=2111&r1=2110&r2=2111
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Wed Feb 7 14:36:52 2007
@@ -165,16 +165,16 @@
CFLAGS+=-DHOTPLUG_FIRMWARE
endif
-# Also build xpp in the subdirectory xpp/ . But only for >=2.6.10 and only
+# Also build xpp in the subdirectory xpp/ . But only for >=2.6.9 and only
# for i386 or x86_64. On other archs the module will probably build but panic.
# These lines are only meaningful when this Makefile is used as kconfig for
# 2.6 build
-ifneq (,$(shell [ 0$(SUBLEVEL) -ge 10 ] && [ "$(ARCH)" = 'i386' ] && [ "x$(BUILD_XPP)" = "xyes" ] && echo 1))
+ifneq (,$(shell [ 0$(SUBLEVEL) -ge 9 ] && [ "$(ARCH)" = 'i386' ] && [ "x$(BUILD_XPP)" = "xyes" ] && echo 1))
obj-m+=xpp/
endif
-ifneq (,$(shell [ 0$(SUBLEVEL) -ge 10 ] && [ "$(ARCH)" = 'x86_64' ] && [ "x$(BUILD_XPP)" = "xyes" ] && echo 1))
+ifneq (,$(shell [ 0$(SUBLEVEL) -ge 9 ] && [ "$(ARCH)" = 'x86_64' ] && [ "x$(BUILD_XPP)" = "xyes" ] && echo 1))
obj-m+=xpp/
endif
Modified: branches/1.4/xpp/xbus-core.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/xpp/xbus-core.c?view=diff&rev=2111&r1=2110&r2=2111
==============================================================================
--- branches/1.4/xpp/xbus-core.c (original)
+++ branches/1.4/xpp/xbus-core.c Wed Feb 7 14:36:52 2007
@@ -69,7 +69,6 @@
static DEVICE_ATTR_FUNC(connector_show, dev, buf);
static DEVICE_ATTR_FUNC(status_show, dev, buf);
-static int xbus_poll(void *data);
static void xbus_release(struct device *dev);
static int xbus_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data);
static int xbus_read_waitfor_xpds(char *page, char **start, off_t off, int count, int *eof, void *data);
@@ -209,8 +208,16 @@
* it returns only when all XPD's on the bus are detected and
* initialized.
*/
-static int xbus_poll(void *data)
-{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+static void xbus_poll(struct work_struct *work)
+{
+ xbus_t *xbus = container_of(work, xbus_t, xpds_init_work);
+#else
+static void xbus_poll(void *data)
+{
+ xbus_t *xbus = data;
+#endif
+
int id;
int ret = 0;
unsigned long flags;
@@ -221,11 +228,10 @@
int count_removed;
int count_added;
int xpd_num;
- xbus_t *xbus = data;
if(!down_read_trylock(&xbus->in_use)) {
ERR("%s is being removed...\n", xbus->busname);
- return -EBUSY;
+ return;
}
msleep(2); /* roundtrip for older polls */
spin_lock_irqsave(&xbus->lock, flags);
@@ -326,7 +332,6 @@
wake_up(&xbus->wait_for_xpd_initialization);
out:
up_read(&xbus->in_use);
- return ret;
}
@@ -343,7 +348,11 @@
xbus->hardware_exists = 1;
DBG("Activating: %s\n", xbus->busname);
/* Poll it */
- INIT_WORK(&xbus->xpds_init_work, (void (*)(void *))xbus_poll, (void *)xbus);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+ INIT_WORK(&xbus->xpds_init_work, xbus_poll);
+#else
+ INIT_WORK(&xbus->xpds_init_work, xbus_poll, xbus);
+#endif
if(!queue_work(xpp_worker, &xbus->xpds_init_work)) {
ERR("Failed to queue xpd initialization work\n");
/* FIXME: need to return error */
More information about the zaptel-commits
mailing list