aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/ttpci/budget-patch.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-04-02 12:53:57 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-02 12:53:57 -0700
commitb043b673dc8a73daa233d5d92cf70b32e7351314 (patch)
treed17fd0616420886adca7eb1bc19ba7a55a789fa8 /drivers/media/dvb/ttpci/budget-patch.c
parentcd5e25d93e6efeb93db7b6731b0a674495270621 (diff)
parentfb9c280d4c6d4586670e3dfd041d8258db36b330 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (49 commits) V4L/DVB (3667b): cpia2: fix function prototype V4L/DVB (3702): Make msp3400 routing defines more consistent V4L/DVB (3700): Remove obsolete commands from tvp5150.c V4L/DVB (3697): More msp3400 and bttv fixes V4L/DVB (3696): Previous change for cx2341X boards broke the remote support V4L/DVB (3693): Fix msp3400c and bttv stereo/mono/bilingual detection/handling V4L/DVB (3692): Keep experimental SLICED_VBI defines under an #if 0 V4L/DVB (3689): Kconfig: fix VP-3054 Secondary I2C Bus build configuration menu dependencies V4L/DVB (3673): Fix budget-av CAM reset V4L/DVB (3672): Fix memory leak in dvr open V4L/DVB (3671): New module parameter 'tv_standard' (dvb-ttpci driver) V4L/DVB (3670): Fix typo in comment V4L/DVB (3669): Configurable dma buffer size for saa7146-based budget dvb cards V4L/DVB (3653h): Move usb v4l docs into Documentation/video4linux V4L/DVB (3667a): Fix SAP + stereo mode at msp3400 V4L/DVB (3666): Remove trailing newlines V4L/DVB (3665): Add new NEC uPD64031A and uPD64083 i2c drivers V4L/DVB (3663): Fix msp3400c wait time and better audio mode fallbacks V4L/DVB (3662): Don't set msp3400c-non-existent register V4L/DVB (3661): Add wm8739 stereo audio ADC i2c driver ...
Diffstat (limited to 'drivers/media/dvb/ttpci/budget-patch.c')
-rw-r--r--drivers/media/dvb/ttpci/budget-patch.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c
index 9fc9185a842..1b3aaac5e76 100644
--- a/drivers/media/dvb/ttpci/budget-patch.c
+++ b/drivers/media/dvb/ttpci/budget-patch.c
@@ -577,6 +577,17 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO);
// Set RPS1 Address register to point to RPS code (r108 p42)
saa7146_write(dev, RPS_ADDR1, dev->d_rps1.dma_handle);
+
+ if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL)))
+ return -ENOMEM;
+
+ dprintk(2, "budget: %p\n", budget);
+
+ if ((err = ttpci_budget_init (budget, dev, info, THIS_MODULE))) {
+ kfree (budget);
+ return err;
+ }
+
// Set Source Line Counter Threshold, using BRS (rCC p43)
// It generates HS event every TS_HEIGHT lines
// this is related to TS_WIDTH set in register
@@ -585,24 +596,13 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte
//,then RPS_THRESH1
// should be set to trigger every TS_HEIGHT (512) lines.
//
- saa7146_write(dev, RPS_THRESH1, (TS_HEIGHT*1) | MASK_12 );
+ saa7146_write(dev, RPS_THRESH1, budget->buffer_height | MASK_12 );
// saa7146_write(dev, RPS_THRESH0, ((TS_HEIGHT/2)<<16) |MASK_28| (TS_HEIGHT/2) |MASK_12 );
// Enable RPS1 (rFC p33)
saa7146_write(dev, MC1, (MASK_13 | MASK_29));
- if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL)))
- return -ENOMEM;
-
- dprintk(2, "budget: %p\n", budget);
-
- if ((err = ttpci_budget_init (budget, dev, info, THIS_MODULE))) {
- kfree (budget);
- return err;
- }
-
-
dev->ext_priv = budget;
budget->dvb_adapter.priv = budget;