[PATCH 02/19] Fix bug in XHFC registering

From: Karsten Keil
Date: Tue May 19 2009 - 10:54:55 EST


From: Andreas Eversberg <andreas@xxxxxxxxxxxx>

Calling mISDN_register_device() without pci device for the XHFC case.

Signed-off-by: Andreas Eversberg <andreas@xxxxxxxxxxxx>
Signed-off-by: Karsten Keil <keil@xxxxxxxxxxxxx>
---
drivers/isdn/hardware/mISDN/hfcmulti.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 896fceb..71b0de5 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -5096,13 +5096,15 @@ init_multi_port(struct hfc_multi *hc, int pt)
test_and_set_bit(HFC_CFG_DIS_ECHANNEL,
&hc->chan[i + 2].cfg);
}
- if (hc->ctype == HFC_TYPE_XHFC)
+ if (hc->ctype == HFC_TYPE_XHFC) {
snprintf(name, MISDN_MAX_IDLEN - 1, "xhfc.%d-%d",
HFC_cnt + 1, pt + 1);
- else
+ ret = mISDN_register_device(&dch->dev, NULL, name);
+ } else {
snprintf(name, MISDN_MAX_IDLEN - 1, "hfc-%ds.%d-%d",
hc->ctype, HFC_cnt + 1, pt + 1);
- ret = mISDN_register_device(&dch->dev, &hc->pci_dev->dev, name);
+ ret = mISDN_register_device(&dch->dev, &hc->pci_dev->dev, name);
+ }
if (ret)
goto free_chan;
hc->created[pt] = 1;
--
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/