aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/bt8xx/dvb-bt8xx.c
diff options
context:
space:
mode:
authorJohannes Stezenbach <js@linuxtv.org>2005-05-17 00:54:39 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-17 10:59:33 -0400
commitfdc53a6dbfea18e621dd23ed5cfb160837d7ce52 (patch)
tree9ce191cdb07264f8c6275c1443e61b465e17d0cb /drivers/media/dvb/bt8xx/dvb-bt8xx.c
parent0b3f5a57bf110b519b706365c86ada199075f34e (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/bt8xx/dvb-bt8xx.c')
-rw-r--r--drivers/media/dvb/bt8xx/dvb-bt8xx.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index b735397f59aa..f9572426a148 100644
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -531,7 +531,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
531 card->bt->dev->subsystem_vendor, 531 card->bt->dev->subsystem_vendor,
532 card->bt->dev->subsystem_device); 532 card->bt->dev->subsystem_device);
533 } else { 533 } else {
534 if (dvb_register_frontend(card->dvb_adapter, card->fe)) { 534 if (dvb_register_frontend(&card->dvb_adapter, card->fe)) {
535 printk("dvb-bt8xx: Frontend registration failed!\n"); 535 printk("dvb-bt8xx: Frontend registration failed!\n");
536 if (card->fe->ops->release) 536 if (card->fe->ops->release)
537 card->fe->ops->release(card->fe); 537 card->fe->ops->release(card->fe);
@@ -550,7 +550,7 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
550 return result; 550 return result;
551 551
552 } 552 }
553 card->dvb_adapter->priv = card; 553 card->dvb_adapter.priv = card;
554 554
555 card->bt->adapter = card->i2c_adapter; 555 card->bt->adapter = card->i2c_adapter;
556 556
@@ -568,7 +568,7 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
568 if ((result = dvb_dmx_init(&card->demux)) < 0) { 568 if ((result = dvb_dmx_init(&card->demux)) < 0) {
569 printk("dvb_bt8xx: dvb_dmx_init failed (errno = %d)\n", result); 569 printk("dvb_bt8xx: dvb_dmx_init failed (errno = %d)\n", result);
570 570
571 dvb_unregister_adapter(card->dvb_adapter); 571 dvb_unregister_adapter(&card->dvb_adapter);
572 return result; 572 return result;
573 } 573 }
574 574
@@ -576,11 +576,11 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
576 card->dmxdev.demux = &card->demux.dmx; 576 card->dmxdev.demux = &card->demux.dmx;
577 card->dmxdev.capabilities = 0; 577 card->dmxdev.capabilities = 0;
578 578
579 if ((result = dvb_dmxdev_init(&card->dmxdev, card->dvb_adapter)) < 0) { 579 if ((result = dvb_dmxdev_init(&card->dmxdev, &card->dvb_adapter)) < 0) {
580 printk("dvb_bt8xx: dvb_dmxdev_init failed (errno = %d)\n", result); 580 printk("dvb_bt8xx: dvb_dmxdev_init failed (errno = %d)\n", result);
581 581
582 dvb_dmx_release(&card->demux); 582 dvb_dmx_release(&card->demux);
583 dvb_unregister_adapter(card->dvb_adapter); 583 dvb_unregister_adapter(&card->dvb_adapter);
584 return result; 584 return result;
585 } 585 }
586 586
@@ -591,7 +591,7 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
591 591
592 dvb_dmxdev_release(&card->dmxdev); 592 dvb_dmxdev_release(&card->dmxdev);
593 dvb_dmx_release(&card->demux); 593 dvb_dmx_release(&card->demux);
594 dvb_unregister_adapter(card->dvb_adapter); 594 dvb_unregister_adapter(&card->dvb_adapter);
595 return result; 595 return result;
596 } 596 }
597 597
@@ -603,7 +603,7 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
603 card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw); 603 card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw);
604 dvb_dmxdev_release(&card->dmxdev); 604 dvb_dmxdev_release(&card->dmxdev);
605 dvb_dmx_release(&card->demux); 605 dvb_dmx_release(&card->demux);
606 dvb_unregister_adapter(card->dvb_adapter); 606 dvb_unregister_adapter(&card->dvb_adapter);
607 return result; 607 return result;
608 } 608 }
609 609
@@ -614,11 +614,11 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
614 card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw); 614 card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw);
615 dvb_dmxdev_release(&card->dmxdev); 615 dvb_dmxdev_release(&card->dmxdev);
616 dvb_dmx_release(&card->demux); 616 dvb_dmx_release(&card->demux);
617 dvb_unregister_adapter(card->dvb_adapter); 617 dvb_unregister_adapter(&card->dvb_adapter);
618 return result; 618 return result;
619 } 619 }
620 620
621 dvb_net_init(card->dvb_adapter, &card->dvbnet, &card->demux.dmx); 621 dvb_net_init(&card->dvb_adapter, &card->dvbnet, &card->demux.dmx);
622 622
623 tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card); 623 tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card);
624 624
@@ -759,7 +759,7 @@ static int dvb_bt8xx_remove(struct device *dev)
759 dvb_dmxdev_release(&card->dmxdev); 759 dvb_dmxdev_release(&card->dmxdev);
760 dvb_dmx_release(&card->demux); 760 dvb_dmx_release(&card->demux);
761 if (card->fe) dvb_unregister_frontend(card->fe); 761 if (card->fe) dvb_unregister_frontend(card->fe);
762 dvb_unregister_adapter(card->dvb_adapter); 762 dvb_unregister_adapter(&card->dvb_adapter);
763 763
764 kfree(card); 764 kfree(card);
765 765