From 2c5a022d3e65779668f071446d80cf27bfe4c037 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 24 Feb 2015 12:46:53 +0100 Subject: port packages mISDN, mISDNuser and capi4k-utils mISDN still has some unresolved problems with sysfs object creation, to be fixed. --- .../patch-drivers_isdn_hardware_mISDN_contr_c | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 package/mISDN/patches/patch-drivers_isdn_hardware_mISDN_contr_c (limited to 'package/mISDN/patches/patch-drivers_isdn_hardware_mISDN_contr_c') diff --git a/package/mISDN/patches/patch-drivers_isdn_hardware_mISDN_contr_c b/package/mISDN/patches/patch-drivers_isdn_hardware_mISDN_contr_c new file mode 100644 index 000000000..e33bde4c5 --- /dev/null +++ b/package/mISDN/patches/patch-drivers_isdn_hardware_mISDN_contr_c @@ -0,0 +1,65 @@ + - capi_ctr_reseted has been renamed in linux kernel commit + 4e329972052c3649367b91de783f6293b8653cb2 + - kernel now wants a struc file_operations for proc files +--- mISDN-1_1_9_2.orig/drivers/isdn/hardware/mISDN/contr.c 2009-01-22 14:36:34.000000000 +0100 ++++ mISDN-1_1_9_2/drivers/isdn/hardware/mISDN/contr.c 2011-07-15 18:33:55.765001537 +0200 +@@ -367,17 +367,12 @@ procinfo(struct capi_ctr *ctrl) + } + + static int +-read_proc(char *page, char **start, off_t off, int count, int *eof, struct capi_ctr *ctrl) ++proc_show(struct seq_file *file, void *data) + { +- int len = 0; ++ struct capi_ctr *ctrl = file->private; + +- len += sprintf(page+len, "mISDN_read_proc\n"); +- if (off+count >= len) +- *eof = 1; +- if (len < off) +- return 0; +- *start = page + off; +- return ((count < len-off) ? count : len-off); ++ seq_printf(file, "mISDN_proc_show\n"); ++ return 0; + }; + + +@@ -399,7 +394,7 @@ ResetController(struct capi_ctr *ctrl) + #ifdef OLDCAPI_DRIVER_INTERFACE + contr->ctrl->reseted(contr->ctrl); + #else +- capi_ctr_reseted(contr->ctrl); ++ capi_ctr_down(contr->ctrl); + #endif + } + +@@ -601,6 +596,19 @@ ControllerPutStatus(Controller_t *contr, + contrDebug(contr, CAPI_DBG_CONTR, "%s: %s", __FUNCTION__, msg); + } + ++static int misdn_proc_open(struct inode *inode, struct file *file) ++{ ++ return single_open(file, proc_show, PDE(inode)->data); ++} ++ ++static const struct file_operations misdn_proc_fops = { ++ .owner = THIS_MODULE, ++ .open = misdn_proc_open, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + int + ControllerConstr(Controller_t **contr_p, mISDNstack_t *st, mISDN_pid_t *pid, mISDNobject_t *ocapi) + { +@@ -719,7 +727,7 @@ ControllerConstr(Controller_t **contr_p, + contr->ctrl->load_firmware = LoadFirmware; + contr->ctrl->reset_ctr = ResetController; + contr->ctrl->procinfo = procinfo; +- contr->ctrl->ctr_read_proc = read_proc; ++ contr->ctrl->proc_fops = &misdn_proc_fops; + retval = attach_capi_ctr(contr->ctrl); + #endif + if (!retval) { -- cgit v1.2.3