[svn-commits] rmudgett: upstream mISDN/latest r81 - in /mISDN/upstream/latest: ./ config/ d...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Mar 12 17:20:57 CDT 2009
Author: rmudgett
Date: Thu Mar 12 17:20:54 2009
New Revision: 81
URL: http://svn.digium.com/svn-view/thirdparty?view=rev&rev=81
Log:
Import version 1.1.9
Added:
mISDN/upstream/latest/mktarball.sh (with props)
Removed:
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/dsp_cmx.c.orig
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/modules.order
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/octvqe/modules.order
Modified:
mISDN/upstream/latest/ (props changed)
mISDN/upstream/latest/Makefile
mISDN/upstream/latest/config/mISDN
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/app_plci.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/avm_fritz.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/core.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/debugtool.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfc_multi.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfc_pci.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfcs_mini.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfcs_usb.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/netjet.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/octvqe/octvqe.ko
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sedl_fax.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/stack.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs.h
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_inst.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_obj.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_st.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/w6692.c
mISDN/upstream/latest/drivers/isdn/hardware/mISDN/xhfc_su.c
mISDN/upstream/latest/include/linux/mISDNif.h
Propchange: mISDN/upstream/latest/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Mar 12 17:20:54 2009
@@ -1,0 +1,1 @@
+VERSION
Modified: mISDN/upstream/latest/Makefile
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/Makefile?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/Makefile (original)
+++ mISDN/upstream/latest/Makefile Thu Mar 12 17:20:54 2009
@@ -2,7 +2,7 @@
MAJOR=1
MINOR=1
-SUBMINOR=8
+SUBMINOR=9
INSTALL_PREFIX := /
export INSTALL_PREFIX
@@ -20,7 +20,6 @@
UPDATE_MODULES=$(shell which update-modules)
MODULES_UPDATE=$(shell which modules-update)
DEPMOD=$(shell which depmod)
-
MISDNDIR=$(BASEDIR)
MISDN_SRC=$(MISDNDIR)/drivers/isdn/hardware/mISDN
@@ -77,9 +76,9 @@
cp mISDN.modprobe.d $(INSTALL_PREFIX)/etc/modules.d/mISDN
test_old_misdn:
- @if echo -ne "#include <linux/mISDNif.h>" | gcc -C -E - 2>/dev/null 1>/dev/null ; then \
- if ! echo -ne "#include <linux/mISDNif.h>\n#if MISDN_MAJOR_VERSION < 4\n#error old mISDNif.h\n#endif\n" | gcc -C -E - 2>/dev/null 1>/dev/null ; then \
- echo -ne "\n!!You should remove the following files:\n\n$(LINUX)/include/linux/mISDNif.h\n$(LINUX)/include/linux/isdn_compat.h\n/usr/include/linux/mISDNif.h\n/usr/include/linux/isdn_compat.h\n\nIn order to upgrade to the mqueue branch\n\n"; \
+ @if echo -n "#include <linux/mISDNif.h>" | gcc -C -E - 2>/dev/null 1>/dev/null ; then \
+ if ! echo -n "#include <linux/mISDNif.h>\n#if MISDN_MAJOR_VERSION < 4\n#error old mISDNif.h\n#endif\n" | gcc -C -E - 2>/dev/null 1>/dev/null ; then \
+ echo -n "\n!!You should remove the following files:\n\n$(LINUX)/include/linux/mISDNif.h\n$(LINUX)/include/linux/isdn_compat.h\n/usr/include/linux/mISDNif.h\n/usr/include/linux/isdn_compat.h\n\nIn order to upgrade to the mqueue branch\n\n"; \
echo -ne "I can do that for you, just type: make force\n\n" ; \
exit 1; \
fi ;\
Modified: mISDN/upstream/latest/config/mISDN
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/config/mISDN?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/config/mISDN (original)
+++ mISDN/upstream/latest/config/mISDN Thu Mar 12 17:20:54 2009
@@ -389,7 +389,7 @@
addcard "w6692pci" "" 1 'mode="te" link="ptmp"'
done
if [ -e ${LSUSB} ]; then
- for line in $(${LSUSB} | ${GREP} "0959:2bd0\|0675:1688\|07b0:0007\|0742:200\(7\|8\|9\|A\)\|08e3:0301\|07fa:084\(7\|8\)\|07ba:0006"); do
+ for line in $(${LSUSB} | ${GREP} "0959:2bd0\|0675:1688\|07b0:0007\|0742:200\(7\|8\|9\|A\)\|08e3:0301\|07fa:084\(7\|8\)\|07ba:0006\|0586:0102"); do
addcard "hfcsusb" "" 1 'mode="te" link="ptmp"'
done
fi
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/app_plci.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/app_plci.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/app_plci.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/app_plci.c Thu Mar 12 17:20:54 2009
@@ -9,6 +9,10 @@
#define AppPlciDebug(aplci, lev, fmt, args...) \
capidebug(lev, fmt, ## args)
+
+#ifndef CAPIUTIL_VERSION
+#define CAPIUTIL_VERSION 1
+#endif
static void AppPlciClearOtherApps(AppPlci_t *);
static void AppPlciInfoIndMsg(AppPlci_t *, __u32, unsigned char);
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/avm_fritz.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/avm_fritz.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/avm_fritz.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/avm_fritz.c Thu Mar 12 17:20:54 2009
@@ -886,13 +886,13 @@
}
reset_avmpcipnp(fc); /* disable IRQ */
if (fc->type == AVM_FRITZ_PCIV2) {
- if (request_irq(fc->irq, avm_fritzv2_interrupt, shared, id, fc)) {
+ if (request_irq(fc->irq, (void *)avm_fritzv2_interrupt, shared, id, fc)) {
printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n",
fc->irq);
return(-EIO);
}
} else {
- if (request_irq(fc->irq, avm_fritz_interrupt, shared, id, fc)) {
+ if (request_irq(fc->irq, (void *)avm_fritz_interrupt, shared, id, fc)) {
printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n",
fc->irq);
return(-EIO);
@@ -1195,7 +1195,11 @@
card->dch.debug = debug;
spin_lock_init(&card->lock);
card->dch.inst.hwlock = &card->lock;
- card->dch.inst.class_dev.dev = dev;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ card->dch.inst.class_dev.parent = dev;
+#else
+ card->dch.inst.class_dev.dev = dev;
+#endif
card->dch.inst.pid.layermask = ISDN_LAYER(0);
card->dch.inst.pid.protocol[0] = ISDN_PID_L0_TE_S0;
mISDN_init_instance(&card->dch.inst, &fritz, card, mISDN_ISAC_l1hw);
@@ -1207,7 +1211,11 @@
mISDN_init_instance(&card->bch[i].inst, &fritz, card, hdlc_down);
card->bch[i].inst.pid.layermask = ISDN_LAYER(0);
card->bch[i].inst.hwlock = &card->lock;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ card->bch[i].inst.class_dev.parent = dev;
+#else
card->bch[i].inst.class_dev.dev = dev;
+#endif
card->bch[i].debug = debug;
sprintf(card->bch[i].inst.name, "%s B%d", card->dch.inst.name, i+1);
mISDN_initchannel(&card->bch[i], MSK_INIT_BCHANNEL, MAX_DATA_MEM);
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/core.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/core.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/core.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/core.c Thu Mar 12 17:20:54 2009
@@ -701,8 +701,10 @@
struct modulelist *ml;
read_lock(&mISDN_modules_lock);
- list_for_each_entry(ml, &mISDN_modulelist, list)
- module_put(ml->module);
+ list_for_each_entry(ml, &mISDN_modulelist, list) {
+ if (module_refcount(ml->module) > 0)
+ module_put(ml->module);
+ }
read_unlock(&mISDN_modules_lock);
}
@@ -756,7 +758,11 @@
if (core_debug & DEBUG_CORE_FUNC)
printk(KERN_DEBUG "mISDN_unregister: mISDN_objectlist(%p<-%p->%p)\n",
mISDN_objectlist.prev, &mISDN_objectlist, mISDN_objectlist.next);
- class_device_unregister(&obj->class_dev);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ device_unregister(&obj->class_dev);
+#else
+ class_device_unregister(&obj->class_dev);
+#endif
return(0);
}
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/debugtool.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/debugtool.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/debugtool.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/debugtool.c Thu Mar 12 17:20:54 2009
@@ -163,15 +163,22 @@
}
/* sysfs */
-static void dt_class_release (struct class_device *dev)
-{}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+static void dt_class_release (struct device *dev) {}
+#else
+static void dt_class_release (struct class_device *dev) {}
+#endif
static struct class dt_class = {
.name = "mISDN-debugtool",
#ifndef CLASS_WITHOUT_OWNER
.owner = THIS_MODULE,
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ .dev_release = &dt_class_release,
+#else
.release = &dt_class_release,
+#endif
};
static ssize_t attr_show_enabled (struct class *class, char *buf)
@@ -235,7 +242,11 @@
if (thread) {
lock_kernel();
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ ret = kill_pid(find_pid_ns(thread->pid, &init_pid_ns), SIGKILL, 1);
+#else
ret = kill_proc(thread->pid, SIGKILL, 1);
+#endif
unlock_kernel();
if (ret < 0)
printk(KERN_INFO MODULE_NAME ": Unknown error (%d) while trying to terminate kernel thread!\n", -ret);
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfc_multi.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfc_multi.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfc_multi.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfc_multi.c Thu Mar 12 17:20:54 2009
@@ -1198,7 +1198,7 @@
} else
led |= 1<<i;
}
- unsigned long leddw=led << 24 | led << 16 | led << 8 | led;
+ unsigned long leddw = led << 24 | led << 16 | led << 8 | led;
//HFC_outb(hc, R_BRG_PCM_CFG, 1);
//HFC_outb(c, R_BRG_PCM_CFG, (0x0 << 6) | 0x3); /*was _io before*/
#ifndef CONFIG_HFCMULTI_PCIMEM
@@ -3299,7 +3299,7 @@
disable_hwirq(hc);
spin_unlock_irqrestore(&hc->lock, flags);
- if (request_irq(hc->pci_dev->irq, hfcmulti_interrupt, SA_SHIRQ, "HFC-multi", hc)) {
+ if (request_irq(hc->pci_dev->irq, (void *)hfcmulti_interrupt, SA_SHIRQ, "HFC-multi", hc)) {
printk(KERN_WARNING "mISDN: Could not get interrupt %d.\n", hc->pci_dev->irq);
return(-EIO);
}
@@ -4048,7 +4048,11 @@
//chan->debug = debug;
chan->inst.obj = &HFCM_obj;
chan->inst.hwlock = &hc->lock;
- chan->inst.class_dev.dev = &pdev->dev;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ chan->inst.class_dev.parent = &pdev->dev;
+#else
+ chan->inst.class_dev.dev = &pdev->dev;
+#endif
mISDN_init_instance(&chan->inst, &HFCM_obj, hc, hfcmulti_l2l1);
chan->inst.pid.layermask = ISDN_LAYER(0);
sprintf(chan->inst.name, "HFCm%d/%d", HFC_idx+1, pt+1);
@@ -4076,7 +4080,12 @@
mISDN_init_instance(&chan->inst, &HFCM_obj, hc, hfcmulti_l2l1);
chan->inst.pid.layermask = ISDN_LAYER(0);
chan->inst.hwlock = &hc->lock;
- chan->inst.class_dev.dev = &pdev->dev;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ chan->inst.class_dev.parent = &pdev->dev;
+#else
+ chan->inst.class_dev.dev = &pdev->dev;
+#endif
+
//bch->debug = debug;
sprintf(chan->inst.name, "%s B%d",
hc->chan[ch].ch->inst.name, i+1);
@@ -4479,9 +4488,11 @@
id_table: hfmultipci_ids,
};
-static void __exit
-HFCmulti_cleanup(void)
-{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+static void HFCmulti_cleanup(void) {
+#else
+static void __exit HFCmulti_cleanup(void) {
+#endif
hfc_multi_t *hc,*next;
int err;
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfc_pci.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfc_pci.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfc_pci.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfc_pci.c Thu Mar 12 17:20:54 2009
@@ -1693,7 +1693,7 @@
spin_lock_irqsave(&hc->lock, flags);
disable_hwirq(hc);
spin_unlock_irqrestore(&hc->lock, flags);
- if (request_irq(hc->irq, hfcpci_interrupt, SA_SHIRQ, "HFC PCI", hc)) {
+ if (request_irq(hc->irq, (void *)hfcpci_interrupt, SA_SHIRQ, "HFC PCI", hc)) {
printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n", hc->irq);
return(-EIO);
}
@@ -2215,7 +2215,12 @@
HFC_cnt);
return(err);
}
- card->dch.inst.class_dev.dev = &card->hw.dev->dev;
+// card->dch.inst.class_dev.dev = &card->hw.dev->dev;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ card->dch.inst.class_dev.parent = &card->hw.dev->dev;
+#else
+ card->dch.inst.class_dev.dev = &card->hw.dev->dev;
+#endif
HFC_cnt++;
if (prev) {
dst = prev->dch.inst.st;
@@ -2234,7 +2239,12 @@
}
mISDN_ctrl(dst, MGR_STOPSTACK | REQUEST, NULL);
for (i = 0; i < 2; i++) {
- card->bch[i].inst.class_dev.dev = &card->hw.dev->dev;
+ //card->bch[i].inst.class_dev.dev = &card->hw.dev->dev;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ card->bch[i].inst.class_dev.parent = &card->hw.dev->dev;
+#else
+ card->bch[i].inst.class_dev.dev = &card->hw.dev->dev;
+#endif
if ((err = mISDN_ctrl(dst, MGR_NEWSTACK | REQUEST, &card->bch[i].inst))) {
printk(KERN_ERR "MGR_ADDSTACK bchan error %d\n", err);
mISDN_ctrl(card->dch.inst.st, MGR_DELSTACK | REQUEST, NULL);
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfcs_mini.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfcs_mini.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
Binary files - no diff available.
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfcs_usb.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfcs_usb.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfcs_usb.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/hfcs_usb.c Thu Mar 12 17:20:54 2009
@@ -202,6 +202,12 @@
{LED_SCHEME1, {0x80, -64, -32, -16},
"Twister ISDN TA"}),
},
+ {
+ USB_DEVICE(0x0586, 0x0102),
+ .driver_info = (unsigned long) &((hfcsusb_vdata)
+ {LED_SCHEME1, {0x88, -64, -32, -16},
+ "ZyXEL OMNI.NET USB II"}),
+ },
{ }
};
@@ -1785,6 +1791,31 @@
start_isoc_chain(card->fifos + HFCUSB_B2_TX, ISOC_PACKETS_B,
(usb_complete_t)tx_iso_complete, 1);
+#ifdef TEST_LEDS
+ __u8 t;
+ t = 0;
+ /*
+ __u8 s;
+ for (s=0; s<10; s++) {
+ for (t=0; t<8; t++) {
+ queued_Write_hfc(card, HFCUSB_P_DATA, 1 << t);
+ printk ("TEST LED: P_DATA: 0x%x\n", 1<<t);
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(2 * HZ);
+ }
+ }
+ */
+
+ // LED test toggle sequence: USB, S0, B1, B2
+ for (t=LED_POWER_ON; t<=LED_B2_OFF; t++) {
+ handle_led(card, t);
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ printk ("TEST_LED (%d) P_DATA: 0x%02x\n",
+ t, card->led_state);
+ schedule_timeout(2 * HZ);
+ }
+#endif
+
handle_led(card, LED_POWER_ON);
return (0);
@@ -1873,7 +1904,11 @@
card->chan[D].inst.hwlock = &card->lock;
card->chan[D].inst.pid.layermask = ISDN_LAYER(0);
card->chan[D].inst.pid.protocol[0] = ISDN_PID_L0_TE_S0;
- card->chan[D].inst.class_dev.dev = &card->dev->dev;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ card->chan[D].inst.class_dev.parent = &card->dev->dev;
+#else
+ card->chan[D].inst.class_dev.dev = &card->dev->dev;
+#endif
mISDN_init_instance(&card->chan[D].inst, &hw_mISDNObj, card, hfcsusb_l2l1);
sprintf(card->chan[D].inst.name, "hfcsusb_%d", hfcsusb_cnt + 1);
mISDN_set_dchannel_pid(&pid, protocol[hfcsusb_cnt], layermask[hfcsusb_cnt]);
@@ -1886,7 +1921,11 @@
mISDN_init_instance(&card->chan[i].inst, &hw_mISDNObj, card, hfcsusb_l2l1);
card->chan[i].inst.pid.layermask = ISDN_LAYER(0);
card->chan[i].inst.hwlock = &card->lock;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ card->chan[i].inst.class_dev.parent = &card->dev->dev;
+#else
card->chan[i].inst.class_dev.dev = &card->dev->dev;
+#endif
card->chan[i].debug = debug;
sprintf(card->chan[i].inst.name, "%s B%d",
card->chan[D].inst.name, i + 1);
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/netjet.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/netjet.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/netjet.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/netjet.c Thu Mar 12 17:20:54 2009
@@ -556,10 +556,11 @@
return(ret);
}
-
-void __init
-inittiger(netjet_t *card)
-{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+void inittiger(netjet_t *card) {
+#else
+void __init inittiger(netjet_t *card) {
+#endif
struct tiger_hw *tiger0, *tiger1;
/* NOTE: I believe hisax tiger driver is wrong.
@@ -1544,7 +1545,7 @@
nj_disable_hwirq(card);
spin_unlock_irqrestore(&card->lock, flags);
- if (request_irq(card->irq, nj_interrupt, SA_SHIRQ, "NETjet", card)) {
+ if (request_irq(card->irq, (void*)nj_interrupt, SA_SHIRQ, "NETjet", card)) {
printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n",
card->irq);
return (-EIO);
@@ -1647,7 +1648,11 @@
card->dch.debug = debug;
spin_lock_init(&card->lock);
card->dch.inst.hwlock = &card->lock;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ card->dch.inst.class_dev.parent = &card->pdev->dev;
+#else
card->dch.inst.class_dev.dev = &card->pdev->dev;
+#endif
card->dch.inst.pid.layermask = ISDN_LAYER(0);
card->dch.inst.pid.protocol[0] = ISDN_PID_L0_TE_S0;
mISDN_init_instance(&card->dch.inst, &netjet_mISDN, card, mISDN_ISAC_l1hw);
@@ -1659,7 +1664,11 @@
mISDN_init_instance(&card->bch[i].inst, &netjet_mISDN, card, tiger_l2l1B);
card->bch[i].inst.pid.layermask = ISDN_LAYER(0);
card->bch[i].inst.hwlock = &card->lock;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ card->bch[i].inst.class_dev.parent = &card->pdev->dev;
+#else
card->bch[i].inst.class_dev.dev = &card->pdev->dev;
+#endif
card->bch[i].debug = debug;
sprintf(card->bch[i].inst.name, "%s B%d", card->dch.inst.name, i+1);
mISDN_initchannel(&card->bch[i], MSK_INIT_BCHANNEL, MAX_DATA_MEM);
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/octvqe/octvqe.ko
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/octvqe/octvqe.ko?view=diff&rev=81&r1=80&r2=81
==============================================================================
Binary files - no diff available.
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sedl_fax.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sedl_fax.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sedl_fax.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sedl_fax.c Thu Mar 12 17:20:54 2009
@@ -26,10 +26,15 @@
* the firmware onto the card.
*/
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/delay.h>
-#include <asm/semaphore.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+# include <linux/semaphore.h>
+#else
+# include <asm/semaphore.h>
+#endif
#ifdef NEW_ISAPNP
#include <linux/pnp.h>
#else
@@ -680,18 +685,26 @@
card->dch.inst.hwlock = &card->lock;
card->dch.inst.pid.layermask = ISDN_LAYER(0);
card->dch.inst.pid.protocol[0] = ISDN_PID_L0_TE_S0;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ card->dch.inst.class_dev.parent = dev;
+#else
card->dch.inst.class_dev.dev = dev;
+#endif
mISDN_init_instance(&card->dch.inst, &speedfax, card, mISDN_ISAC_l1hw);
sprintf(card->dch.inst.name, "SpeedFax%d", sedl_cnt+1);
mISDN_set_dchannel_pid(&pid, protocol[sedl_cnt], layermask[sedl_cnt]);
mISDN_initchannel(&card->dch, MSK_INIT_DCHANNEL, MAX_DFRAME_LEN_L1);
for (i=0; i<2; i++) {
card->bch[i].channel = i;
- mISDN_init_instance(&card->bch[i].inst, &speedfax, card, isar_down);
- card->bch[i].inst.pid.layermask = ISDN_LAYER(0);
- card->bch[i].inst.hwlock = &card->lock;
- card->bch[i].debug = debug;
+ mISDN_init_instance(&card->bch[i].inst, &speedfax, card, isar_down);
+ card->bch[i].inst.pid.layermask = ISDN_LAYER(0);
+ card->bch[i].inst.hwlock = &card->lock;
+ card->bch[i].debug = debug;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ card->bch[i].inst.class_dev.parent = dev;
+#else
card->bch[i].inst.class_dev.dev = dev;
+#endif
sprintf(card->bch[i].inst.name, "%s B%d", card->dch.inst.name, i+1);
mISDN_initchannel(&card->bch[i], MSK_INIT_BCHANNEL, MAX_DATA_MEM);
}
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/stack.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/stack.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/stack.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/stack.c Thu Mar 12 17:20:54 2009
@@ -654,7 +654,7 @@
new_stack(mISDNstack_t *master, mISDNinstance_t *inst)
{
mISDNstack_t *newst;
- int err;
+ //int err;
u_long flags;
if (core_debug & DEBUG_CORE_FUNC)
@@ -969,7 +969,8 @@
int
register_layer(mISDNstack_t *st, mISDNinstance_t *inst)
{
- int idx, err;
+ int idx;
+ //int err;
mISDNinstance_t *dup;
u_long flags;
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs.h
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs.h?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs.h (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs.h Thu Mar 12 17:20:54 2009
@@ -27,6 +27,57 @@
return sprintf(buf, "%d\n", pid->maxplen);
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#define MISDN_PROTO(_type, _name, _mode) \
+static ssize_t show_protocol_##_name(struct device *class_dev, struct device_attribute *attr, char *buf) \
+{ \
+ _type##_t *p = to_##_type(class_dev); \
+ return(mISDN_show_pid_protocol(&p->_name, buf)); \
+} \
+struct device_attribute _type##_attr_protocol_##_name = \
+ __ATTR(protocol,_mode,show_protocol_##_name, NULL); \
+static ssize_t show_parameter_##_name(struct device *class_dev, struct device_attribute *attr, char *buf) \
+{ \
+ _type##_t *p = to_##_type(class_dev); \
+ return(mISDN_show_pid_parameter(&p->_name, buf)); \
+} \
+struct device_attribute _type##_attr_parameter_##_name = \
+ __ATTR(parameter,_mode,show_parameter_##_name, NULL); \
+static ssize_t show_layermask_##_name(struct device *class_dev, struct device_attribute *attr, char *buf) \
+{ \
+ _type##_t *p = to_##_type(class_dev); \
+ return(show_pid_layermask(&p->_name, buf)); \
+} \
+struct device_attribute _type##_attr_layermask_##_name = \
+ __ATTR(layermask,_mode,show_layermask_##_name, NULL); \
+static ssize_t show_global_##_name(struct device *class_dev, struct device_attribute *attr, char *buf) \
+{ \
+ _type##_t *p = to_##_type(class_dev); \
+ return(show_pid_global(&p->_name, buf)); \
+} \
+struct device_attribute _type##_attr_global_##_name = \
+ __ATTR(global,_mode,show_global_##_name, NULL); \
+static ssize_t show_maxplen_##_name(struct device *class_dev, struct device_attribute *attr, char *buf) \
+{ \
+ _type##_t *p = to_##_type(class_dev); \
+ return(show_pid_maxplen(&p->_name, buf)); \
+} \
+struct device_attribute _type##_attr_maxplen_##_name = \
+ __ATTR(maxplen,_mode,show_maxplen_##_name, NULL); \
+static struct attribute *attr_##_name[] = { \
+ &_type##_attr_global_##_name.attr, \
+ &_type##_attr_layermask_##_name.attr, \
+ &_type##_attr_maxplen_##_name.attr, \
+ &_type##_attr_parameter_##_name.attr, \
+ &_type##_attr_protocol_##_name.attr, \
+ NULL \
+}; \
+static struct attribute_group _name##_group = { \
+ .name = __stringify(_name), \
+ .attrs = attr_##_name, \
+}
+
+#else
#define MISDN_PROTO(_type, _name, _mode) \
static ssize_t show_protocol_##_name(struct class_device *class_dev, char *buf) \
{ \
@@ -75,3 +126,4 @@
.name = __stringify(_name), \
.attrs = attr_##_name, \
}
+#endif
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_inst.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_inst.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_inst.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_inst.c Thu Mar 12 17:20:54 2009
@@ -12,15 +12,41 @@
#define to_mISDNinstance(d) container_of(d, mISDNinstance_t, class_dev)
-static ssize_t show_inst_id(struct class_device *class_dev, char *buf)
-{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+static ssize_t show_inst_id(struct device *class_dev, struct device_attribute *attr, char *buf) {
+ mISDNinstance_t *inst = to_mISDNinstance(class_dev);
+ return sprintf(buf, "%08x\n", inst->id);
+}
+static DEVICE_ATTR(id, S_IRUGO, show_inst_id, NULL);
+
+static ssize_t show_inst_name(struct device *class_dev, struct device_attribute *attr, char *buf) {
+ mISDNinstance_t *inst = to_mISDNinstance(class_dev);
+ return sprintf(buf, "%s\n", inst->name);
+}
+static DEVICE_ATTR(name, S_IRUGO, show_inst_name, NULL);
+
+static ssize_t show_inst_extentions(struct device *class_dev, struct device_attribute *attr, char *buf)
+{
+ mISDNinstance_t *inst = to_mISDNinstance(class_dev);
+ return sprintf(buf, "%08x\n", inst->extentions);
+}
+static DEVICE_ATTR(extentions, S_IRUGO, show_inst_extentions, NULL);
+
+static ssize_t show_inst_regcnt(struct device *class_dev, struct device_attribute *attr, char *buf)
+{
+ mISDNinstance_t *inst = to_mISDNinstance(class_dev);
+ return sprintf(buf, "%d\n", inst->regcnt);
+}
+static DEVICE_ATTR(regcnt, S_IRUGO, show_inst_regcnt, NULL);
+
+#else
+static ssize_t show_inst_id(struct class_device *class_dev, char *buf) {
mISDNinstance_t *inst = to_mISDNinstance(class_dev);
return sprintf(buf, "%08x\n", inst->id);
}
static CLASS_DEVICE_ATTR(id, S_IRUGO, show_inst_id, NULL);
-static ssize_t show_inst_name(struct class_device *class_dev, char *buf)
-{
+static ssize_t show_inst_name(struct class_device *class_dev, char *buf) {
mISDNinstance_t *inst = to_mISDNinstance(class_dev);
return sprintf(buf, "%s\n", inst->name);
}
@@ -39,13 +65,31 @@
return sprintf(buf, "%d\n", inst->regcnt);
}
static CLASS_DEVICE_ATTR(regcnt, S_IRUGO, show_inst_regcnt, NULL);
+#endif
#ifdef SYSFS_SUPPORT
MISDN_PROTO(mISDNinstance, pid, S_IRUGO);
#endif
-static void release_mISDN_inst(struct class_device *dev)
-{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+static void release_mISDN_inst(struct device *dev) {
+#ifdef SYSFS_SUPPORT
+ mISDNinstance_t *inst = to_mISDNinstance(dev);
+
+ if (inst->obj)
+ sysfs_remove_link(&dev->kobj, "obj");
+ sysfs_remove_group(&inst->class_dev.kobj, &pid_group);
+#endif
+ if (core_debug & DEBUG_SYSFS)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ printk(KERN_INFO "release instance class dev %s\n", dev->bus_id);
+#else
+ printk(KERN_INFO "release instance class dev %s\n", dev->class_id);
+#endif
+}
+
+#else
+static void release_mISDN_inst(struct class_device *dev) {
#ifdef SYSFS_SUPPORT
mISDNinstance_t *inst = to_mISDNinstance(dev);
@@ -54,15 +98,24 @@
sysfs_remove_group(&inst->class_dev.kobj, &pid_group);
#endif
if (core_debug & DEBUG_SYSFS)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ printk(KERN_INFO "release instance class dev %s\n", dev->bus_id);
+#else
printk(KERN_INFO "release instance class dev %s\n", dev->class_id);
-}
+#endif
+}
+#endif
static struct class inst_dev_class = {
.name = "mISDN-instances",
#ifndef CLASS_WITHOUT_OWNER
.owner = THIS_MODULE,
#endif
- .release = &release_mISDN_inst,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ .dev_release = &release_mISDN_inst,
+#else
+ .release = &release_mISDN_inst
+#endif
};
int
@@ -73,15 +126,27 @@
#endif
inst->class_dev.class = &inst_dev_class;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ snprintf(inst->class_dev.bus_id, BUS_ID_SIZE, "inst-%08x", inst->id);
+ err = device_register(&inst->class_dev);
+#else
snprintf(inst->class_dev.class_id, BUS_ID_SIZE, "inst-%08x", inst->id);
err = class_device_register(&inst->class_dev);
+#endif
if (err)
return(err);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ device_create_file(&inst->class_dev, &dev_attr_id);
+ device_create_file(&inst->class_dev, &dev_attr_name);
+ device_create_file(&inst->class_dev, &dev_attr_extentions);
+ device_create_file(&inst->class_dev, &dev_attr_regcnt);
+#else
class_device_create_file(&inst->class_dev, &class_device_attr_id);
class_device_create_file(&inst->class_dev, &class_device_attr_name);
class_device_create_file(&inst->class_dev, &class_device_attr_extentions);
class_device_create_file(&inst->class_dev, &class_device_attr_regcnt);
+#endif
#ifdef SYSFS_SUPPORT
err = sysfs_create_group(&inst->class_dev.kobj, &pid_group);
@@ -123,7 +188,11 @@
sysfs_remove_link(&inst->st->class_dev.kobj, "mgr");
#endif
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ device_unregister(&inst->class_dev);
+#else
class_device_unregister(&inst->class_dev);
+#endif
}
}
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_obj.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_obj.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_obj.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_obj.c Thu Mar 12 17:20:54 2009
@@ -12,27 +12,45 @@
#define to_mISDNobject(d) container_of(d, mISDNobject_t, class_dev)
-static ssize_t show_obj_name(struct class_device *class_dev, char *buf)
-{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+static ssize_t show_obj_name(struct device *class_dev, struct device_attribute *attr, char *buf) {
+ mISDNobject_t *obj = to_mISDNobject(class_dev);
+ return sprintf(buf, "%s\n", obj->name);
+}
+
+static DEVICE_ATTR(name, S_IRUGO, show_obj_name, NULL);
+
+static ssize_t show_obj_id(struct device *class_dev, struct device_attribute *attr, char *buf) {
+ mISDNobject_t *obj = to_mISDNobject(class_dev);
+ return sprintf(buf, "%d\n", obj->id);
+}
+static DEVICE_ATTR(id, S_IRUGO, show_obj_id, NULL);
+
+static ssize_t show_obj_refcnt(struct device *class_dev, struct device_attribute *attr, char *buf) {
+ mISDNobject_t *obj = to_mISDNobject(class_dev);
+ return sprintf(buf, "%d\n", obj->id);
+}
+static DEVICE_ATTR(refcnt, S_IRUGO, show_obj_refcnt, NULL);
+
+#else
+static ssize_t show_obj_name(struct class_device *class_dev, char *buf) {
mISDNobject_t *obj = to_mISDNobject(class_dev);
return sprintf(buf, "%s\n", obj->name);
}
-
static CLASS_DEVICE_ATTR(name, S_IRUGO, show_obj_name, NULL);
-static ssize_t show_obj_id(struct class_device *class_dev, char *buf)
-{
- mISDNobject_t *obj = to_mISDNobject(class_dev);
- return sprintf(buf, "%d\n", obj->id);
+static ssize_t show_obj_id(struct class_device *class_dev, char *buf) {
+ mISDNobject_t *obj = to_mISDNobject(class_dev);
+ return sprintf(buf, "%d\n", obj->id);
}
static CLASS_DEVICE_ATTR(id, S_IRUGO, show_obj_id, NULL);
-static ssize_t show_obj_refcnt(struct class_device *class_dev, char *buf)
-{
- mISDNobject_t *obj = to_mISDNobject(class_dev);
- return sprintf(buf, "%d\n", obj->refcnt);
+static ssize_t show_obj_refcnt(struct class_device *class_dev, char *buf) {
+ mISDNobject_t *obj = to_mISDNobject(class_dev);
+ return sprintf(buf, "%d\n", obj->id);
}
static CLASS_DEVICE_ATTR(refcnt, S_IRUGO, show_obj_refcnt, NULL);
+#endif
ssize_t mISDN_show_pid_protocol(mISDN_pid_t *pid, char *buf)
{
@@ -77,7 +95,7 @@
MISDN_PROTO(mISDNobject, DPROTO, S_IRUGO);
#endif
-static void release_mISDN_obj(struct class_device *dev)
+static void release_mISDN_obj(struct device *dev)
{
#ifdef SYSFS_SUPPORT
mISDNobject_t *obj = to_mISDNobject(dev);
@@ -101,7 +119,7 @@
#ifndef CLASS_WITHOUT_OWNER
.owner = THIS_MODULE,
#endif
- .release = &release_mISDN_obj,
+ .dev_release = &release_mISDN_obj,
};
int
@@ -109,14 +127,25 @@
int err;
obj->class_dev.class = &obj_dev_class;
- snprintf(obj->class_dev.class_id, BUS_ID_SIZE, "obj-%d", obj->id);
- err = class_device_register(&obj->class_dev);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ snprintf(obj->class_dev.bus_id, BUS_ID_SIZE, "obj-%d", obj->id);
+ err = device_register(&obj->class_dev);
+#else
+ snprintf(obj->class_dev.class_id, BUS_ID_SIZE, "obj-%d", obj->id);
+ err = class_device_register(&obj->class_dev);
+#endif
if (err)
goto out;
- class_device_create_file(&obj->class_dev, &class_device_attr_id);
- class_device_create_file(&obj->class_dev, &class_device_attr_name);
- class_device_create_file(&obj->class_dev, &class_device_attr_refcnt);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ device_create_file(&obj->class_dev, &dev_attr_id);
+ device_create_file(&obj->class_dev, &dev_attr_name);
+ device_create_file(&obj->class_dev, &dev_attr_refcnt);
+#else
+ class_device_create_file(&obj->class_dev, &class_device_attr_id);
+ class_device_create_file(&obj->class_dev, &class_device_attr_name);
+ class_device_create_file(&obj->class_dev, &class_device_attr_refcnt);
+#endif
#ifdef SYSFS_SUPPORT
err = sysfs_create_group(&obj->class_dev.kobj, &BPROTO_group);
if (err)
Modified: mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_st.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_st.c?view=diff&rev=81&r1=80&r2=81
==============================================================================
--- mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_st.c (original)
+++ mISDN/upstream/latest/drivers/isdn/hardware/mISDN/sysfs_st.c Thu Mar 12 17:20:54 2009
@@ -12,20 +12,34 @@
#define to_mISDNstack(d) container_of(d, mISDNstack_t, class_dev)
-static ssize_t show_st_id(struct class_device *class_dev, char *buf)
-{
- mISDNstack_t *st = to_mISDNstack(class_dev);
- return sprintf(buf, "%08x\n", st->id);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+
+static ssize_t show_st_id(struct device *class_dev, struct device_attribute *attr, char *buf) {
+ mISDNstack_t *st = to_mISDNstack(class_dev);
+ return sprintf(buf, "%08x\n", st->id);
+}
+static DEVICE_ATTR(id, S_IRUGO, show_st_id, NULL);
+
+static ssize_t show_st_status(struct device *class_dev, struct device_attribute *attr, char *buf) {
+ mISDNstack_t *st = to_mISDNstack(class_dev);
+ return sprintf(buf, "0x%08lx\n", st->status);
+}
+
+static ssize_t store_st_status(struct device *class_dev, struct device_attribute *attr, const char *buf, size_t count)
+#else
+static ssize_t show_st_id(struct class_device *class_dev, char *buf) {
+ mISDNstack_t *st = to_mISDNstack(class_dev);
+ return sprintf(buf, "%08x\n", st->id);
}
static CLASS_DEVICE_ATTR(id, S_IRUGO, show_st_id, NULL);
-static ssize_t show_st_status(struct class_device *class_dev, char *buf)
-{
+static ssize_t show_st_status(struct class_device *class_dev, char *buf) {
mISDNstack_t *st = to_mISDNstack(class_dev);
return sprintf(buf, "0x%08lx\n", st->status);
}
static ssize_t store_st_status(struct class_device *class_dev, const char *buf, size_t count)
+#endif
{
mISDNstack_t *st = to_mISDNstack(class_dev);
ulong status;
@@ -59,9 +73,16 @@
wake_up_interruptible(&st->workq);
return(count);
}
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+static DEVICE_ATTR(status, S_IRUGO | S_IWUSR, show_st_status, store_st_status);
+
+static ssize_t store_st_protocol(struct device *class_dev, struct device_attribute *attr, const char *buf, size_t count)
+#else
static CLASS_DEVICE_ATTR(status, S_IRUGO | S_IWUSR, show_st_status, store_st_status);
static ssize_t store_st_protocol(struct class_device *class_dev, const char *buf, size_t count)
+#endif
{
mISDNstack_t *st = to_mISDNstack(class_dev);
ulong tmp;
@@ -82,7 +103,11 @@
return(count);
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+static ssize_t store_st_layermask(struct device *class_dev, struct device_attribute *attr, const char *buf, size_t count)
+#else
static ssize_t store_st_layermask(struct class_device *class_dev, const char *buf, size_t count)
+#endif
{
mISDNstack_t *st = to_mISDNstack(class_dev);
ulong mask = (1<<(MAX_LAYER_NR + 1)) -1;
@@ -95,7 +120,11 @@
return(count);
}
-static ssize_t store_st_parameter(struct class_device *class_dev, const char *buf, size_t count)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+static ssize_t store_st_parameter(struct device *class_dev, struct device_attribute *attr, const char *buf, size_t count)
+#else
+static ssize_t store_st_parameter(struct class_device *class_dev, struct device_attribute *attr, const char *buf, size_t count)
+#endif
{
mISDNstack_t *st = to_mISDNstack(class_dev);
ulong tmp;
@@ -167,14 +196,23 @@
#endif
MISDN_PROTO(mISDNstack, new_pid, S_IRUGO);
-static ssize_t show_st_qlen(struct class_device *class_dev, char *buf)
-{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+static ssize_t show_st_qlen(struct device *class_dev, struct device_attribute *sttr, char *buf) {
+ mISDNstack_t *st = to_mISDNstack(class_dev);
+ return sprintf(buf, "%d\n", skb_queue_len(&st->msgq));
+}
+static DEVICE_ATTR(qlen, S_IRUGO, show_st_qlen, NULL);
+
+static void release_mISDN_stack(struct device *dev)
+#else
+static ssize_t show_st_qlen(struct class_device *class_dev, char *buf) {
mISDNstack_t *st = to_mISDNstack(class_dev);
return sprintf(buf, "%d\n", skb_queue_len(&st->msgq));
}
static CLASS_DEVICE_ATTR(qlen, S_IRUGO, show_st_qlen, NULL);
static void release_mISDN_stack(struct class_device *dev)
+#endif
{
#ifdef SYSFS_SUPPORT
mISDNstack_t *st = to_mISDNstack(dev);
@@ -204,7 +242,11 @@
#ifndef CLASS_WITHOUT_OWNER
.owner = THIS_MODULE,
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
[... 273 lines stripped ...]
More information about the svn-commits
mailing list