diff options
author | Johannes Stezenbach <js@linuxtv.org> | 2005-05-17 00:54:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-17 10:59:33 -0400 |
commit | fdc53a6dbfea18e621dd23ed5cfb160837d7ce52 (patch) | |
tree | 9ce191cdb07264f8c6275c1443e61b465e17d0cb /drivers/media/dvb/ttpci/budget-av.c | |
parent | 0b3f5a57bf110b519b706365c86ada199075f34e (diff) |
[PATCH] dvb: modified dvb_register_adapter() to avoid kmalloc/kfree
Modified dvb_register_adapter() to avoid kmalloc/kfree. Drivers have to embed
struct dvb_adapter into their private data struct from now on. (Andreas
Oberritter)
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/ttpci/budget-av.c')
-rw-r--r-- | drivers/media/dvb/ttpci/budget-av.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c index 9860caf32495..7891f3f06f04 100644 --- a/drivers/media/dvb/ttpci/budget-av.c +++ b/drivers/media/dvb/ttpci/budget-av.c | |||
@@ -297,7 +297,7 @@ static int ciintf_init(struct budget_av *budget_av) | |||
297 | budget_av->ca.slot_ts_enable = ciintf_slot_ts_enable; | 297 | budget_av->ca.slot_ts_enable = ciintf_slot_ts_enable; |
298 | budget_av->ca.poll_slot_status = ciintf_poll_slot_status; | 298 | budget_av->ca.poll_slot_status = ciintf_poll_slot_status; |
299 | budget_av->ca.data = budget_av; | 299 | budget_av->ca.data = budget_av; |
300 | if ((result = dvb_ca_en50221_init(budget_av->budget.dvb_adapter, | 300 | if ((result = dvb_ca_en50221_init(&budget_av->budget.dvb_adapter, |
301 | &budget_av->ca, 0, 1)) != 0) { | 301 | &budget_av->ca, 0, 1)) != 0) { |
302 | printk("budget_av: CI interface detected, but initialisation failed.\n"); | 302 | printk("budget_av: CI interface detected, but initialisation failed.\n"); |
303 | goto error; | 303 | goto error; |
@@ -767,7 +767,7 @@ static void frontend_init(struct budget_av *budget_av) | |||
767 | budget_av->budget.dev->pci->subsystem_device); | 767 | budget_av->budget.dev->pci->subsystem_device); |
768 | } else { | 768 | } else { |
769 | if (dvb_register_frontend | 769 | if (dvb_register_frontend |
770 | (budget_av->budget.dvb_adapter, budget_av->budget.dvb_frontend)) { | 770 | (&budget_av->budget.dvb_adapter, budget_av->budget.dvb_frontend)) { |
771 | printk("budget-av: Frontend registration failed!\n"); | 771 | printk("budget-av: Frontend registration failed!\n"); |
772 | if (budget_av->budget.dvb_frontend->ops->release) | 772 | if (budget_av->budget.dvb_frontend->ops->release) |
773 | budget_av->budget.dvb_frontend->ops->release(budget_av->budget.dvb_frontend); | 773 | budget_av->budget.dvb_frontend->ops->release(budget_av->budget.dvb_frontend); |
@@ -875,18 +875,18 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio | |||
875 | /* fixme: find some sane values here... */ | 875 | /* fixme: find some sane values here... */ |
876 | saa7146_write(dev, PCI_BT_V1, 0x1c00101f); | 876 | saa7146_write(dev, PCI_BT_V1, 0x1c00101f); |
877 | 877 | ||
878 | mac = budget_av->budget.dvb_adapter->proposed_mac; | 878 | mac = budget_av->budget.dvb_adapter.proposed_mac; |
879 | if (i2c_readregs(&budget_av->budget.i2c_adap, 0xa0, 0x30, mac, 6)) { | 879 | if (i2c_readregs(&budget_av->budget.i2c_adap, 0xa0, 0x30, mac, 6)) { |
880 | printk("KNC1-%d: Could not read MAC from KNC1 card\n", | 880 | printk("KNC1-%d: Could not read MAC from KNC1 card\n", |
881 | budget_av->budget.dvb_adapter->num); | 881 | budget_av->budget.dvb_adapter.num); |
882 | memset(mac, 0, 6); | 882 | memset(mac, 0, 6); |
883 | } else { | 883 | } else { |
884 | printk("KNC1-%d: MAC addr = %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", | 884 | printk("KNC1-%d: MAC addr = %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", |
885 | budget_av->budget.dvb_adapter->num, | 885 | budget_av->budget.dvb_adapter.num, |
886 | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); | 886 | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); |
887 | } | 887 | } |
888 | 888 | ||
889 | budget_av->budget.dvb_adapter->priv = budget_av; | 889 | budget_av->budget.dvb_adapter.priv = budget_av; |
890 | frontend_init(budget_av); | 890 | frontend_init(budget_av); |
891 | 891 | ||
892 | if (enable_ci) | 892 | if (enable_ci) |