diff options
author | Michael Hunold <devnull@localhost> | 2003-06-18 12:20:44 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2003-06-18 12:20:44 +0000 |
commit | fb0c1b161937e8936aa52c67a353650d3e1e2926 (patch) | |
tree | 8b3d6dcf6a0022440ff8ebbcf3d8619bfa1cd8a7 /linux/drivers/media/dvb/ttpci | |
parent | d803680c98d5c00510224ac46c315f1ba2d7f6ac (diff) | |
download | mediapointer-dvb-s2-fb0c1b161937e8936aa52c67a353650d3e1e2926.tar.gz mediapointer-dvb-s2-fb0c1b161937e8936aa52c67a353650d3e1e2926.tar.bz2 |
When I submitted the last patchset for the 2.5 kernel series,
Alan Cox reformatted the code to follow his coding style when
he fixed the merge bugs.
This patch now introduces these coding style changes, so
that we don't wipe out his changes with the next patchset.
Diffstat (limited to 'linux/drivers/media/dvb/ttpci')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 334 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_firm.h | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_ipack.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_ir.c | 22 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-av.c | 45 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-ci.c | 45 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-core.c | 24 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-patch.c | 34 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget.c | 30 |
9 files changed, 188 insertions, 354 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 964eb9ed8..d749e33bb 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -58,19 +58,19 @@ #include <linux/slab.h> #include <linux/string.h> #include <linux/pci.h> -#include <asm/system.h> -#include <asm/bitops.h> -#include <asm/io.h> -#include <asm/dma.h> -#include <asm/semaphore.h> #include <linux/init.h> #include <linux/vmalloc.h> - #include <linux/netdevice.h> #include <linux/inetdevice.h> #include <linux/etherdevice.h> #include <linux/skbuff.h> +#include <asm/system.h> +#include <asm/bitops.h> +#include <asm/io.h> +#include <asm/dma.h> +#include <asm/semaphore.h> + #include <linux/dvb/frontend.h> #include "dvb_i2c.h" @@ -122,8 +122,7 @@ int av7110_num = 0; /* This DEBI code is based on the Stradis driver by Nathan Laredo <laredo@gnu.org> */ -static -int wait_for_debi_done(struct av7110 *av7110) +static int wait_for_debi_done(struct av7110 *av7110) { struct saa7146_dev *dev = av7110->dev; int start; @@ -202,16 +201,14 @@ static u32 debiread(struct av7110 *av7110, u32 config, int addr, int count) /* fixme: val can be a pointer to a memory or an u32 value -- this won't work on 64bit platforms! */ -static inline void -iwdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) +static inline void iwdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) { if (count>4 && val) memcpy(av7110->debi_virt, (char *) val, count); debiwrite(av7110, config, addr, val, count); } -static inline u32 -irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) +static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) { u32 res; @@ -223,8 +220,7 @@ irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) /* DEBI outside interrupts, only for count<=4! */ -static inline void -wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) +static inline void wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) { unsigned long flags; @@ -233,8 +229,7 @@ wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) spin_unlock_irqrestore(&av7110->debilock, flags); } -static inline u32 -rdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) +static inline u32 rdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) { unsigned long flags; u32 res; @@ -246,8 +241,7 @@ rdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) } -static inline char -chtrans(char c) +static inline char chtrans(char c) { if (c<32 || c>126) c=0x20; @@ -257,8 +251,7 @@ chtrans(char c) /* handle mailbox registers of the dual ported RAM */ -static inline void -ARM_ResetMailBox(struct av7110 *av7110) +static inline void ARM_ResetMailBox(struct av7110 *av7110) { unsigned long flags; @@ -271,20 +264,17 @@ ARM_ResetMailBox(struct av7110 *av7110) spin_unlock_irqrestore(&av7110->debilock, flags); } -static inline void -ARM_ClearMailBox(struct av7110 *av7110) +static inline void ARM_ClearMailBox(struct av7110 *av7110) { iwdebi(av7110, DEBINOSWAP, IRQ_RX, 0, 2); } -static inline void -ARM_ClearIrq(struct av7110 *av7110) +static inline void ARM_ClearIrq(struct av7110 *av7110) { irdebi(av7110, DEBINOSWAP, IRQ_RX, 0, 2); } -static void -reset_arm(struct av7110 *av7110) +static void reset_arm(struct av7110 *av7110) { saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTLO); @@ -310,8 +300,7 @@ reset_arm(struct av7110 *av7110) printk("av7110: ARM RESET\n"); } -static void -recover_arm(struct av7110 *av7110) +static void recover_arm(struct av7110 *av7110) { DEB_EE(("av7110: %p\n",av7110)); @@ -327,8 +316,7 @@ recover_arm(struct av7110 *av7110) outcom(av7110, COMTYPE_PIDFILTER, SetIR, 1, av7110->ir_config); } -static void -arm_error(struct av7110 *av7110) +static void arm_error(struct av7110 *av7110) { DEB_EE(("av7110: %p\n",av7110)); @@ -379,8 +367,7 @@ static int arm_thread(void *data) } -static int -record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len) +static int record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len) { struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) p2t->priv; @@ -397,8 +384,7 @@ record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len) return dvb_filter_pes2ts(p2t, buf, len); } -static int -dvb_filter_pes2ts_cb(void *priv, unsigned char *data) +static int dvb_filter_pes2ts_cb(void *priv, unsigned char *data) { struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) priv; @@ -410,8 +396,7 @@ dvb_filter_pes2ts_cb(void *priv, unsigned char *data) return 0; } -static int -AV_StartRecord(struct av7110 *av7110, int av, +static int AV_StartRecord(struct av7110 *av7110, int av, struct dvb_demux_feed *dvbdmxfeed) { struct dvb_demux *dvbdmx=dvbdmxfeed->demux; @@ -456,8 +441,7 @@ AV_StartRecord(struct av7110 *av7110, int av, return 0; } -static int -AV_StartPlay(struct av7110 *av7110, int av) +static int AV_StartPlay(struct av7110 *av7110, int av) { DEB_EE(("av7110: %p\n",av7110)); @@ -490,8 +474,7 @@ AV_StartPlay(struct av7110 *av7110, int av) return av7110->playing; } -static void -AV_Stop(struct av7110 *av7110, int av) +static void AV_Stop(struct av7110 *av7110, int av) { DEB_EE(("av7110: %p\n",av7110)); @@ -616,8 +599,7 @@ void CI_handle(struct av7110 *av7110, u8 *data, u16 len) } -static inline int -DvbDmxFilterCallback(u8 * buffer1, size_t buffer1_len, +static inline int DvbDmxFilterCallback(u8 * buffer1, size_t buffer1_len, u8 * buffer2, size_t buffer2_len, struct dvb_demux_filter *dvbdmxfilter, enum dmx_success success, @@ -678,8 +660,7 @@ u8 pshead[0x26] = { //#define DEBUG_TIMING -inline static void -print_time(char *s) +static inline void print_time(char *s) { #ifdef DEBUG_TIMING struct timeval tv; @@ -688,8 +669,7 @@ print_time(char *s) #endif } -static void -ci_get_data(struct dvb_ringbuffer *cibuf, u8 *data, int len) +static void ci_get_data(struct dvb_ringbuffer *cibuf, u8 *data, int len) { if (dvb_ringbuffer_free(cibuf) < len+2) return; @@ -702,8 +682,7 @@ ci_get_data(struct dvb_ringbuffer *cibuf, u8 *data, int len) wake_up_interruptible(&cibuf->queue); } -static -void debiirq (unsigned long data) +static void debiirq (unsigned long data) { struct av7110 *av7110 = (struct av7110*) data; int type=av7110->debitype; @@ -833,8 +812,7 @@ void debiirq (unsigned long data) spin_unlock(&av7110->debilock); } -static int -pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen) +static int pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen) { int len; u32 sync; @@ -878,8 +856,7 @@ pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen) } -static -void gpioirq (unsigned long data) +static void gpioirq (unsigned long data) { struct av7110 *av7110 = (struct av7110*) data; u32 rxbuf, txbuf; @@ -1188,8 +1165,7 @@ static int OutCommand(struct av7110 *av7110, u16* buf, int length) return 0; } -inline static int -SOutCommand(struct av7110 *av7110, u16* buf, int length) +static inline int SOutCommand(struct av7110 *av7110, u16* buf, int length) { int ret; @@ -1330,8 +1306,7 @@ static int CommandRequest(struct av7110 *av7110, u16 *Buff, int length, u16 *buf } -static inline int -RequestParameter(struct av7110 *av7110, u16 tag, u16* Buff, s16 length) +static inline int RequestParameter(struct av7110 *av7110, u16 tag, u16* Buff, s16 length) { int ret; ret = CommandRequest(av7110, &tag, 0, Buff, length); @@ -1345,8 +1320,7 @@ RequestParameter(struct av7110 *av7110, u16 tag, u16* Buff, s16 length) * Firmware commands ****************************************************************************/ -static inline int -msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val) +static inline int msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val) { u8 msg[5]={ dev, reg>>8, reg&0xff, val>>8 , val&0xff }; struct dvb_i2c_bus *i2c = av7110->i2c_bus; @@ -1359,16 +1333,14 @@ msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val) return i2c->xfer(i2c, &msgs, 1); } -inline static int -SendDAC(struct av7110 *av7110, u8 addr, u8 data) +static inline int SendDAC(struct av7110 *av7110, u8 addr, u8 data) { // DEB_EE(("av7110: %p\n",av7110)); return outcom(av7110, COMTYPE_AUDIODAC, AudioDAC, 2, addr, data); } -static int -SetVolume(struct av7110 *av7110, int volleft, int volright) +static int SetVolume(struct av7110 *av7110, int volleft, int volright) { int err, vol, val, balance = 0; @@ -1409,41 +1381,41 @@ SetVolume(struct av7110 *av7110, int volleft, int volright) #ifdef CONFIG_DVB_AV7110_OSD -inline static int ResetBlend(struct av7110 *av7110, u8 windownr) +static inline int ResetBlend(struct av7110 *av7110, u8 windownr) { return outcom(av7110, COMTYPE_OSD, SetNonBlend, 1, windownr); } -inline static int SetColorBlend(struct av7110 *av7110, u8 windownr) +static inline int SetColorBlend(struct av7110 *av7110, u8 windownr) { return outcom(av7110, COMTYPE_OSD, SetCBlend, 1, windownr); } -inline static int SetWindowBlend(struct av7110 *av7110, u8 windownr, u8 blending) +static inline int SetWindowBlend(struct av7110 *av7110, u8 windownr, u8 blending) { return outcom(av7110, COMTYPE_OSD, SetWBlend, 2, windownr, blending); } -inline static int SetBlend_(struct av7110 *av7110, u8 windownr, +static inline int SetBlend_(struct av7110 *av7110, u8 windownr, enum av7110_osd_palette_type colordepth, u16 index, u8 blending) { return outcom(av7110, COMTYPE_OSD, SetBlend, 4, windownr, colordepth, index, blending); } -inline static int SetColor_(struct av7110 *av7110, u8 windownr, +static inline int SetColor_(struct av7110 *av7110, u8 windownr, enum av7110_osd_palette_type colordepth, u16 index, u16 colorhi, u16 colorlo) { return outcom(av7110, COMTYPE_OSD, SetColor, 5, windownr, colordepth, index, colorhi, colorlo); } -inline static int BringToTop(struct av7110 *av7110, u8 windownr) +static inline int BringToTop(struct av7110 *av7110, u8 windownr) { return outcom(av7110, COMTYPE_OSD, WTop, 1, windownr); } -inline static int SetFont(struct av7110 *av7110, u8 windownr, u8 fontsize, +static inline int SetFont(struct av7110 *av7110, u8 windownr, u8 fontsize, u16 colorfg, u16 colorbg) { return outcom(av7110, COMTYPE_OSD, Set_Font, 4, @@ -1511,36 +1483,36 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf) return ret; } -inline static int DrawLine(struct av7110 *av7110, u8 windownr, +static inline int DrawLine(struct av7110 *av7110, u8 windownr, u16 x, u16 y, u16 dx, u16 dy, u16 color) { return outcom(av7110, COMTYPE_OSD, DLine, 6, windownr, x, y, dx, dy, color); } -inline static int DrawBlock(struct av7110 *av7110, u8 windownr, +static inline int DrawBlock(struct av7110 *av7110, u8 windownr, u16 x, u16 y, u16 dx, u16 dy, u16 color) { return outcom(av7110, COMTYPE_OSD, DBox, 6, windownr, x, y, dx, dy, color); } -inline static int HideWindow(struct av7110 *av7110, u8 windownr) +static inline int HideWindow(struct av7110 *av7110, u8 windownr) { return outcom(av7110, COMTYPE_OSD, WHide, 1, windownr); } -inline static int MoveWindowRel(struct av7110 *av7110, u8 windownr, u16 x, u16 y) +static inline int MoveWindowRel(struct av7110 *av7110, u8 windownr, u16 x, u16 y) { return outcom(av7110, COMTYPE_OSD, WMoveD, 3, windownr, x, y); } -inline static int MoveWindowAbs(struct av7110 *av7110, u8 windownr, u16 x, u16 y) +static inline int MoveWindowAbs(struct av7110 *av7110, u8 windownr, u16 x, u16 y) { return outcom(av7110, COMTYPE_OSD, WMoveA, 3, windownr, x, y); } -inline static int DestroyOSDWindow(struct av7110 *av7110, u8 windownr) +static inline int DestroyOSDWindow(struct av7110 *av7110, u8 windownr) { return outcom(av7110, COMTYPE_OSD, WDestroy, 1, windownr); } @@ -1555,8 +1527,7 @@ static void DestroyOSDWindows(struct av7110 *av7110) } #endif -static inline int -CreateOSDWindow(struct av7110 *av7110, u8 windownr, +static inline int CreateOSDWindow(struct av7110 *av7110, u8 windownr, enum av7110_window_display_type disptype, u16 width, u16 height) { return outcom(av7110, COMTYPE_OSD, WCreate, 4, @@ -1567,8 +1538,7 @@ CreateOSDWindow(struct av7110 *av7110, u8 windownr, static enum av7110_osd_palette_type bpp2pal[8]={Pal1Bit, Pal2Bit, 0, Pal4Bit, 0, 0, 0, Pal8Bit}; static enum av7110_window_display_type bpp2bit[8]={BITMAP1, BITMAP2, 0, BITMAP4, 0, 0, 0, BITMAP8}; -static inline int -LoadBitmap(struct av7110 *av7110, u16 format, u16 dx, u16 dy, int inc, u8* data) +static inline int LoadBitmap(struct av7110 *av7110, u16 format, u16 dx, u16 dy, int inc, u8* data) { int bpp; int i; @@ -1627,8 +1597,7 @@ LoadBitmap(struct av7110 *av7110, u16 format, u16 dx, u16 dy, int inc, u8* data) return outcom(av7110, COMTYPE_OSD, LoadBmp, 3, format, dx, dy); } -static int -BlitBitmap(struct av7110 *av7110, u16 win, u16 x, u16 y, u16 trans) +static int BlitBitmap(struct av7110 *av7110, u16 win, u16 x, u16 y, u16 trans) { DECLARE_WAITQUEUE(wait, current); @@ -1653,8 +1622,7 @@ BlitBitmap(struct av7110 *av7110, u16 win, u16 x, u16 y, u16 trans) return -1; } -static inline int -ReleaseBitmap(struct av7110 *av7110) +static inline int ReleaseBitmap(struct av7110 *av7110) { DEB_EE(("av7110: %p\n",av7110)); @@ -1680,8 +1648,7 @@ static u32 RGB2YUV(u16 R, u16 G, u16 B) return Cr|(Cb<<16)|(Y<<8); } -static void -OSDSetColor(struct av7110 *av7110, u8 color, u8 r, u8 g, u8 b, u8 blend) +static void OSDSetColor(struct av7110 *av7110, u8 color, u8 r, u8 g, u8 b, u8 blend) { u16 ch, cl; u32 yuv; @@ -1695,8 +1662,7 @@ OSDSetColor(struct av7110 *av7110, u8 color, u8 r, u8 g, u8 b, u8 blend) color, ((blend>>4)&0x0f)); } -static int -OSDSetPalette(struct av7110 *av7110, u32 *colors, u8 first, u8 last) +static int OSDSetPalette(struct av7110 *av7110, u32 *colors, u8 first, u8 last) { int i; int length = last - first + 1; @@ -1714,8 +1680,7 @@ OSDSetPalette(struct av7110 *av7110, u32 *colors, u8 first, u8 last) av7110->osdwin, bpp2pal[av7110->osdbpp[av7110->osdwin]], first, last); } -static int -OSDSetBlock(struct av7110 *av7110, int x0, int y0, int x1, int y1, int inc, u8 *data) +static int OSDSetBlock(struct av7110 *av7110, int x0, int y0, int x1, int y1, int inc, u8 *data) { uint w, h, bpp, bpl, size, lpb, bnum, brest; int i; @@ -1745,8 +1710,7 @@ OSDSetBlock(struct av7110 *av7110, int x0, int y0, int x1, int y1, int inc, u8 * return 0; } -static int -OSD_DrawCommand(struct av7110 *av7110, osd_cmd_t *dc) +static int OSD_DrawCommand(struct av7110 *av7110, osd_cmd_t *dc) { switch (dc->cmd) { case OSD_Close: @@ -1856,8 +1820,7 @@ OSD_DrawCommand(struct av7110 *av7110, osd_cmd_t *dc) } -static int -dvb_osd_ioctl(struct inode *inode, struct file *file, +static int dvb_osd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; @@ -1892,8 +1855,7 @@ static struct dvb_device dvbdev_osd = { /* get version of the firmware ROM, RTSL, video ucode and ARM application */ -static void -firmversion(struct av7110 *av7110) +static void firmversion(struct av7110 *av7110) { u16 buf[20]; @@ -1924,8 +1886,7 @@ firmversion(struct av7110 *av7110) return; } -static int -waitdebi(struct av7110 *av7110, int adr, int state) +static int waitdebi(struct av7110 *av7110, int adr, int state) { int k; @@ -1939,8 +1900,7 @@ waitdebi(struct av7110 *av7110, int adr, int state) } -static int -load_dram(struct av7110 *av7110, u32 *data, int len) +static int load_dram(struct av7110 *av7110, u32 *data, int len) { int i; int blocks, rest; @@ -1988,8 +1948,7 @@ load_dram(struct av7110 *av7110, u32 *data, int len) } -static u8 -bootcode[] = { +static u8 bootcode[] = { 0xea, 0x00, 0x00, 0x0e, 0xe1, 0xb0, 0xf0, 0x0e, /* 0x0000 */ 0xe2, 0x5e, 0xf0, 0x04, 0xe2, 0x5e, 0xf0, 0x04, 0xe2, 0x5e, 0xf0, 0x08, 0xe2, 0x5e, 0xf0, 0x04, @@ -2015,8 +1974,7 @@ bootcode[] = { #include "av7110_firm.h" -static int -bootarm(struct av7110 *av7110) +static int bootarm(struct av7110 *av7110) { struct saa7146_dev *dev= av7110->dev; u32 ret; @@ -2095,8 +2053,7 @@ bootarm(struct av7110 *av7110) return 0; } -static inline int -SetPIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, +static inline int SetPIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, u16 subpid, u16 pcrpid) { DEB_EE(("av7110: %p\n",av7110)); @@ -2114,8 +2071,7 @@ SetPIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, pcrpid, vpid, apid, ttpid, subpid); } -static void -ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, +static void ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, u16 subpid, u16 pcrpid) { DEB_EE(("av7110: %p\n",av7110)); @@ -2139,8 +2095,7 @@ ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, } -static void -SetMode(struct av7110 *av7110, int mode) +static void SetMode(struct av7110 *av7110, int mode) { DEB_EE(("av7110: %p\n",av7110)); @@ -2155,23 +2110,20 @@ SetMode(struct av7110 *av7110, int mode) } } -inline static void -TestMode(struct av7110 *av7110, int mode) +static inline void TestMode(struct av7110 *av7110, int mode) { // DEB_EE(("av7110: %p\n",av7110)); outcom(av7110, COMTYPE_ENCODER, SetTestMode, 1, mode); } -inline static void -VidMode(struct av7110 *av7110, int mode) +static inline void VidMode(struct av7110 *av7110, int mode) { // DEB_EE(("av7110: %p\n",av7110)); outcom(av7110, COMTYPE_ENCODER, SetVidMode, 1, mode); } -static int inline -vidcom(struct av7110 *av7110, u32 com, u32 arg) +static int inline vidcom(struct av7110 *av7110, u32 com, u32 arg) { // DEB_EE(("av7110: %p\n",av7110)); return outcom(av7110, 0x80, 0x02, 4, @@ -2179,24 +2131,21 @@ vidcom(struct av7110 *av7110, u32 com, u32 arg) (arg>>16), (arg&0xffff)); } -static int inline -audcom(struct av7110 *av7110, u32 com) +static int inline audcom(struct av7110 *av7110, u32 com) { // DEB_EE(("av7110: %p\n",av7110)); return outcom(av7110, 0x80, 0x03, 4, (com>>16), (com&0xffff)); } -inline static void -Set22K(struct av7110 *av7110, int state) +static inline void Set22K(struct av7110 *av7110, int state) { DEB_EE(("av7110: %p\n",av7110)); outcom(av7110, COMTYPE_AUDIODAC, (state ? ON22K : OFF22K), 0); } -static -int SendDiSEqCMsg(struct av7110 *av7110, int len, u8 *msg, unsigned long burst) +static int SendDiSEqCMsg(struct av7110 *av7110, int len, u8 *msg, unsigned long burst) { int i; u16 buf[18] = { ((COMTYPE_AUDIODAC << 8) + SendDiSEqC), @@ -2228,8 +2177,7 @@ int SendDiSEqCMsg(struct av7110 *av7110, int len, u8 *msg, unsigned long burst) * I2C client commands ****************************************************************************/ -static inline int -i2c_writereg(struct av7110 *av7110, u8 id, u8 reg, u8 val) +static inline int i2c_writereg(struct av7110 *av7110, u8 id, u8 reg, u8 val) { u8 msg[2]={ reg, val }; struct dvb_i2c_bus *i2c = av7110->i2c_bus; @@ -2242,8 +2190,7 @@ i2c_writereg(struct av7110 *av7110, u8 id, u8 reg, u8 val) return i2c->xfer (i2c, &msgs, 1); } -static inline u8 -i2c_readreg(struct av7110 *av7110, u8 id, u8 reg) +static inline u8 i2c_readreg(struct av7110 *av7110, u8 id, u8 reg) { struct dvb_i2c_bus *i2c = av7110->i2c_bus; u8 mm1[] = {0x00}; @@ -2273,8 +2220,7 @@ static int sw2mode[16] = { VIDEO_MODE_PAL, VIDEO_MODE_PAL, VIDEO_MODE_PAL, VIDEO_MODE_PAL, }; -static void -get_video_format(struct av7110 *av7110, u8 *buf, int count) +static void get_video_format(struct av7110 *av7110, u8 *buf, int count) { int i; int hsize,vsize; @@ -2300,8 +2246,7 @@ get_video_format(struct av7110 *av7110, u8 *buf, int count) } } -static inline long -aux_ring_buffer_write(struct dvb_ringbuffer *rbuf, const char *buf, unsigned long count) +static inline long aux_ring_buffer_write(struct dvb_ringbuffer *rbuf, const char *buf, unsigned long count) { unsigned long todo = count; int free; @@ -2323,8 +2268,7 @@ aux_ring_buffer_write(struct dvb_ringbuffer *rbuf, const char *buf, unsigned lon return count-todo; } -static void -play_video_cb(u8 *buf, int count, void *priv) +static void play_video_cb(u8 *buf, int count, void *priv) { struct av7110 *av7110=(struct av7110 *) priv; DEB_EE(("av7110: %p\n",av7110)); @@ -2336,8 +2280,7 @@ play_video_cb(u8 *buf, int count, void *priv) aux_ring_buffer_write(&av7110->aout, buf, count); } -static void -play_audio_cb(u8 *buf, int count, void *priv) +static void play_audio_cb(u8 *buf, int count, void *priv) { struct av7110 *av7110=(struct av7110 *) priv; DEB_EE(("av7110: %p\n",av7110)); @@ -2347,8 +2290,7 @@ play_audio_cb(u8 *buf, int count, void *priv) #define FREE_COND (dvb_ringbuffer_free(&av7110->avout)>=20*1024 && dvb_ringbuffer_free(&av7110->aout)>=20*1024) -static ssize_t -dvb_play(struct av7110 *av7110, const u8 *buf, +static ssize_t dvb_play(struct av7110 *av7110, const u8 *buf, unsigned long count, int nonblock, int type, int umem) { unsigned long todo = count, n; @@ -2386,8 +2328,7 @@ dvb_play(struct av7110 *av7110, const u8 *buf, return count-todo; } -static ssize_t -dvb_aplay(struct av7110 *av7110, const u8 *buf, +static ssize_t dvb_aplay(struct av7110 *av7110, const u8 *buf, unsigned long count, int nonblock, int type) { unsigned long todo = count, n; @@ -2940,8 +2881,7 @@ int av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) return 0; } -static -unsigned int dvb_audio_poll(struct file *file, poll_table *wait) +static unsigned int dvb_audio_poll(struct file *file, poll_table *wait) { struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; @@ -2975,8 +2915,7 @@ unsigned int dvb_audio_poll(struct file *file, poll_table *wait) * hardware filter functions ******************************************************************************/ -static int -StartHWFilter(struct dvb_demux_filter *dvbdmxfilter) +static int StartHWFilter(struct dvb_demux_filter *dvbdmxfilter) { struct dvb_demux_feed *dvbdmxfeed=dvbdmxfilter->feed; struct av7110 *av7110=(struct av7110 *) dvbdmxfeed->demux->priv; @@ -3019,8 +2958,7 @@ StartHWFilter(struct dvb_demux_filter *dvbdmxfilter) return ret; } -static int -StopHWFilter(struct dvb_demux_filter *dvbdmxfilter) +static int StopHWFilter(struct dvb_demux_filter *dvbdmxfilter) { struct av7110 *av7110=(struct av7110 *) dvbdmxfilter->feed->demux->priv; u16 buf[3]; @@ -3055,8 +2993,7 @@ StopHWFilter(struct dvb_demux_filter *dvbdmxfilter) } -static int -av7110_write_to_decoder(struct dvb_demux_feed *feed, const u8 *buf, size_t len) +static int av7110_write_to_decoder(struct dvb_demux_feed *feed, const u8 *buf, size_t len) { struct dvb_demux *demux = feed->demux; struct av7110 *av7110 = (struct av7110 *) demux->priv; @@ -3095,8 +3032,7 @@ av7110_write_to_decoder(struct dvb_demux_feed *feed, const u8 *buf, size_t len) } -static void -dvb_feed_start_pid(struct dvb_demux_feed *dvbdmxfeed) +static void dvb_feed_start_pid(struct dvb_demux_feed *dvbdmxfeed) { struct dvb_demux *dvbdmx=dvbdmxfeed->demux; struct av7110 *av7110=(struct av7110 *) dvbdmx->priv; @@ -3134,8 +3070,7 @@ dvb_feed_start_pid(struct dvb_demux_feed *dvbdmxfeed) } } -static void -dvb_feed_stop_pid(struct dvb_demux_feed *dvbdmxfeed) +static void dvb_feed_stop_pid(struct dvb_demux_feed *dvbdmxfeed) { struct dvb_demux *dvbdmx=dvbdmxfeed->demux; struct av7110 *av7110=(struct av7110 *) dvbdmx->priv; @@ -3172,8 +3107,7 @@ dvb_feed_stop_pid(struct dvb_demux_feed *dvbdmxfeed) ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]); } -static int -av7110_start_feed(struct dvb_demux_feed *feed) +static int av7110_start_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; struct av7110 *av7110 = (struct av7110 *) demux->priv; @@ -3231,8 +3165,7 @@ av7110_start_feed(struct dvb_demux_feed *feed) } -static int -av7110_stop_feed(struct dvb_demux_feed *feed) +static int av7110_stop_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; struct av7110 *av7110 = (struct av7110 *) demux->priv; @@ -3272,8 +3205,7 @@ av7110_stop_feed(struct dvb_demux_feed *feed) } -static void -restart_feeds(struct av7110 *av7110) +static void restart_feeds(struct av7110 *av7110) { struct dvb_demux *dvbdmx=&av7110->demux; struct dvb_demux_feed *feed; @@ -3340,8 +3272,7 @@ static int dvb_get_stc(struct dmx_demux *demux, unsigned int num, * SEC device file operations ******************************************************************************/ -static -int av7110_diseqc_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) +static int av7110_diseqc_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) { struct av7110 *av7110 = fe->before_after_data; @@ -3431,8 +3362,7 @@ int ci_ll_reset(struct dvb_ringbuffer *cibuf, struct file *file, return 0; } -static ssize_t -ci_ll_write(struct dvb_ringbuffer *cibuf, struct file *file, const char *buf, size_t count, loff_t *ppos) +static ssize_t ci_ll_write(struct dvb_ringbuffer *cibuf, struct file *file, const char *buf, size_t count, loff_t *ppos) { int free; int non_blocking=file->f_flags&O_NONBLOCK; @@ -3454,8 +3384,7 @@ ci_ll_write(struct dvb_ringbuffer *cibuf, struct file *file, const char *buf, si return dvb_ringbuffer_write(cibuf,buf,count,1); } -static ssize_t -ci_ll_read(struct dvb_ringbuffer *cibuf, struct file *file, char *buf, size_t count, loff_t *ppos) +static ssize_t ci_ll_read(struct dvb_ringbuffer *cibuf, struct file *file, char *buf, size_t count, loff_t *ppos) { int avail; int non_blocking=file->f_flags&O_NONBLOCK; @@ -3480,8 +3409,7 @@ ci_ll_read(struct dvb_ringbuffer *cibuf, struct file *file, char *buf, size_t co return dvb_ringbuffer_read(cibuf,buf,len,1); } -static int -dvb_ca_open(struct inode *inode, struct file *file) +static int dvb_ca_open(struct inode *inode, struct file *file) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; struct av7110 *av7110=(struct av7110 *) dvbdev->priv; @@ -3495,8 +3423,7 @@ dvb_ca_open(struct inode *inode, struct file *file) return 0; } -static -unsigned int dvb_ca_poll (struct file *file, poll_table *wait) +static unsigned int dvb_ca_poll (struct file *file, poll_table *wait) { struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; @@ -3517,8 +3444,7 @@ unsigned int dvb_ca_poll (struct file *file, poll_table *wait) return mask; } -static -int dvb_ca_ioctl(struct inode *inode, struct file *file, +static int dvb_ca_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; @@ -3606,8 +3532,7 @@ int dvb_ca_ioctl(struct inode *inode, struct file *file, return 0; } -static ssize_t -dvb_ca_write(struct file *file, const char *buf, +static ssize_t dvb_ca_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; @@ -3617,8 +3542,7 @@ dvb_ca_write(struct file *file, const char *buf, return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos); } -static ssize_t -dvb_ca_read(struct file *file, char *buf, size_t count, loff_t *ppos) +static ssize_t dvb_ca_read(struct file *file, char *buf, size_t count, loff_t *ppos) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; struct av7110 *av7110=(struct av7110 *) dvbdev->priv; @@ -3632,8 +3556,7 @@ dvb_ca_read(struct file *file, char *buf, size_t count, loff_t *ppos) /****************************************************************************** * Video MPEG decoder events ******************************************************************************/ -static -void dvb_video_add_event (struct av7110 *av7110, struct video_event *event) +static void dvb_video_add_event (struct av7110 *av7110, struct video_event *event) { struct dvb_video_events *events = &av7110->video_events; int wp; @@ -3660,8 +3583,7 @@ void dvb_video_add_event (struct av7110 *av7110, struct video_event *event) } -static -int dvb_video_get_event (struct av7110 *av7110, struct video_event *event, int flags) +static int dvb_video_get_event (struct av7110 *av7110, struct video_event *event, int flags) { struct dvb_video_events *events = &av7110->video_events; @@ -3701,8 +3623,7 @@ int dvb_video_get_event (struct av7110 *av7110, struct video_event *event, int f * DVB device file operations ******************************************************************************/ -static -unsigned int dvb_video_poll(struct file *file, poll_table *wait) +static unsigned int dvb_video_poll(struct file *file, poll_table *wait) { struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; @@ -3725,8 +3646,7 @@ unsigned int dvb_video_poll(struct file *file, poll_table *wait) return mask; } -static ssize_t -dvb_video_write(struct file *file, const char *buf, +static ssize_t dvb_video_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; @@ -3740,8 +3660,7 @@ dvb_video_write(struct file *file, const char *buf, return dvb_play(av7110, buf, count, file->f_flags&O_NONBLOCK, 1, 1); } -static ssize_t -dvb_audio_write(struct file *file, const char *buf, +static ssize_t dvb_audio_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; @@ -3760,8 +3679,7 @@ u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00 }; #define MIN_IFRAME 400000 -static int -play_iframe(struct av7110 *av7110, u8 *buf, unsigned int len, int nonblock) +static int play_iframe(struct av7110 *av7110, u8 *buf, unsigned int len, int nonblock) { int i, n=1; @@ -3784,8 +3702,7 @@ play_iframe(struct av7110 *av7110, u8 *buf, unsigned int len, int nonblock) } -static int -dvb_video_ioctl(struct inode *inode, struct file *file, +static int dvb_video_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; @@ -3980,8 +3897,7 @@ dvb_video_ioctl(struct inode *inode, struct file *file, return ret; } -static int -dvb_audio_ioctl(struct inode *inode, struct file *file, +static int dvb_audio_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; @@ -4221,8 +4137,7 @@ static struct dvb_device dvbdev_ca = { }; -static -void av7110_before_after_tune (fe_status_t s, void *data) +static void av7110_before_after_tune (fe_status_t s, void *data) { struct av7110 *av7110 = data; @@ -4249,8 +4164,7 @@ void av7110_before_after_tune (fe_status_t s, void *data) } -static -int av7110_register(struct av7110 *av7110) +static int av7110_register(struct av7110 *av7110) { int ret, i; struct dvb_demux *dvbdemux=&av7110->demux; @@ -4360,8 +4274,7 @@ int av7110_register(struct av7110 *av7110) } -static void -dvb_unregister(struct av7110 *av7110) +static void dvb_unregister(struct av7110 *av7110) { struct dvb_demux *dvbdemux=&av7110->demux; @@ -4395,8 +4308,7 @@ dvb_unregister(struct av7110 *av7110) // } } -static -int master_xfer (struct dvb_i2c_bus *i2c, const struct i2c_msg msgs[], int num) +static int master_xfer (struct dvb_i2c_bus *i2c, const struct i2c_msg msgs[], int num) { struct saa7146_dev *dev = i2c->data; return saa7146_i2c_transfer(dev, msgs, num, 6); @@ -4417,8 +4329,7 @@ struct saa7146_extension_ioctls ioctls[] = { { 0, 0 } }; -static -int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext) +static int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext) { struct av7110 *av7110 = NULL; int ret = 0; @@ -4475,7 +4386,7 @@ int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *p /* set dd1 stream a & b */ saa7146_write(dev, DD1_STREAM_B, 0x00000000); - saa7146_write(dev, DD1_INIT, 0x0200000); + saa7146_write(dev, DD1_INIT, 0x02000000); saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); /* upload all */ @@ -4651,8 +4562,7 @@ err: return ret; } -static -int av7110_detach (struct saa7146_dev* saa) +static int av7110_detach (struct saa7146_dev* saa) { struct av7110 *av7110 = (struct av7110*)saa->ext_priv; DEB_EE(("av7110: %p\n",av7110)); @@ -4692,8 +4602,7 @@ int av7110_detach (struct saa7146_dev* saa) } -static -void av7110_irq(struct saa7146_dev* dev, u32 *isr) +static void av7110_irq(struct saa7146_dev* dev, u32 *isr) { struct av7110 *av7110 = (struct av7110*)dev->ext_priv; @@ -4709,8 +4618,7 @@ void av7110_irq(struct saa7146_dev* dev, u32 *isr) /* FIXME: these values are experimental values that look better than the values from the latest "official" driver -- at least for me... (MiHu) */ -static -struct saa7146_standard standard[] = { +static struct saa7146_standard standard[] = { { "PAL", V4L2_STD_PAL, 0x15, 288, 576, 0x4a, 708, 709, 576, 768 }, // { "PAL", V4L2_STD_PAL, 0x15, 288, 576, 0x3a, 720, 721, 576, 768 }, { "NTSC", V4L2_STD_NTSC, 0x10, 244, 480, 0x40, 708, 709, 480, 640 }, @@ -4726,8 +4634,7 @@ static struct saa7146_standard dvb_standard[] = { { "NTSC", V4L2_STD_NTSC, 0x10, 244, 480, 0x40, 708, 709, 480, 640 }, }; -static -struct saa7146_extension av7110_extension; +static struct saa7146_extension av7110_extension; #define MAKE_AV7110_INFO(x_var,x_name) \ static struct saa7146_pci_extension_data x_var = { \ @@ -4744,8 +4651,7 @@ MAKE_AV7110_INFO(unkwn1, "Technotrend/Hauppauge PCI rev?(unknown1)?"); MAKE_AV7110_INFO(unkwn2, "Technotrend/Hauppauge PCI rev?(unknown2)?"); MAKE_AV7110_INFO(nexus, "Technotrend/Hauppauge Nexus PCI DVB-S"); -static -struct pci_device_id pci_tbl[] = { +static struct pci_device_id pci_tbl[] = { MAKE_EXTENSION_PCI(fs_1_5, 0x110a, 0xffff), MAKE_EXTENSION_PCI(fs_1_5, 0x110a, 0x0000), MAKE_EXTENSION_PCI(fs_1_3, 0x13c2, 0x0000), @@ -4785,8 +4691,7 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std) } -static -struct saa7146_ext_vv av7110_vv_data = { +static struct saa7146_ext_vv av7110_vv_data = { .inputs = 1, .audios = 1, .capabilities = V4L2_CAP_TUNER, @@ -4800,8 +4705,7 @@ struct saa7146_ext_vv av7110_vv_data = { .ioctl = av7110_ioctl, }; -static -struct saa7146_extension av7110_extension = { +static struct saa7146_extension av7110_extension = { .name = "dvb\0", .ext_vv_data = &av7110_vv_data, @@ -4815,8 +4719,7 @@ struct saa7146_extension av7110_extension = { }; -static -int __init av7110_init(void) +static int __init av7110_init(void) { if (saa7146_register_extension(&av7110_extension)) return -ENODEV; @@ -4827,8 +4730,7 @@ int __init av7110_init(void) } -static -void __exit av7110_exit(void) +static void __exit av7110_exit(void) { av7110_ir_exit(); saa7146_unregister_extension(&av7110_extension); diff --git a/linux/drivers/media/dvb/ttpci/av7110_firm.h b/linux/drivers/media/dvb/ttpci/av7110_firm.h index 95bbbd9d4..a8ea32ca6 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_firm.h +++ b/linux/drivers/media/dvb/ttpci/av7110_firm.h @@ -1,5 +1,5 @@ -#include <asm/types.h> +#include <linux/types.h> u8 Dpram [] __initdata = { 0xe5, 0x9f, 0xf0, 0x1c, 0xe1, 0xb0, 0xf0, 0x0e, diff --git a/linux/drivers/media/dvb/ttpci/av7110_ipack.c b/linux/drivers/media/dvb/ttpci/av7110_ipack.c index 003d3e0bb..805a6453a 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_ipack.c +++ b/linux/drivers/media/dvb/ttpci/av7110_ipack.c @@ -40,8 +40,7 @@ void av7110_ipack_free(struct ipack * p) } -static -void send_ipack(struct ipack *p) +static void send_ipack(struct ipack *p) { int off; struct dvb_audio_info ai; @@ -122,8 +121,7 @@ void av7110_ipack_flush(struct ipack *p) } -static -void write_ipack(struct ipack *p, const u8 *data, int count) +static void write_ipack(struct ipack *p, const u8 *data, int count) { u8 headr[3] = { 0x00, 0x00, 0x01} ; diff --git a/linux/drivers/media/dvb/ttpci/av7110_ir.c b/linux/drivers/media/dvb/ttpci/av7110_ir.c index 3c7d11029..d9f05258c 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_ir.c +++ b/linux/drivers/media/dvb/ttpci/av7110_ir.c @@ -1,9 +1,9 @@ -#include <asm/types.h> -#include <asm/bitops.h> +#include <linux/types.h> #include <linux/init.h> #include <linux/module.h> #include <linux/input.h> #include <linux/proc_fs.h> +#include <asm/bitops.h> #include "av7110.h" @@ -23,8 +23,7 @@ static struct input_dev input_dev; static u32 ir_config; -static -u16 key_map [256] = { +static u16 key_map [256] = { KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_BACK, 0, KEY_POWER, KEY_MUTE, 0, KEY_INFO, KEY_VOLUMEUP, KEY_VOLUMEDOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -48,8 +47,7 @@ u16 key_map [256] = { }; -static -void av7110_emit_keyup (unsigned long data) +static void av7110_emit_keyup (unsigned long data) { if (!data || !test_bit (data, input_dev.key)) return; @@ -58,12 +56,10 @@ void av7110_emit_keyup (unsigned long data) } -static -struct timer_list keyup_timer = { function: av7110_emit_keyup }; +static struct timer_list keyup_timer = { function: av7110_emit_keyup }; -static -void av7110_emit_key (u32 ircom) +static void av7110_emit_key (u32 ircom) { u8 data; u8 addr; @@ -122,8 +118,7 @@ void av7110_emit_key (u32 ircom) old_toggle = new_toggle; } -static -void input_register_keys (void) +static void input_register_keys (void) { int i; @@ -144,8 +139,7 @@ static void input_repeat_key(unsigned long data) } -static -int av7110_ir_write_proc (struct file *file, const char *buffer, +static int av7110_ir_write_proc (struct file *file, const char *buffer, unsigned long count, void *data) { char *page; diff --git a/linux/drivers/media/dvb/ttpci/budget-av.c b/linux/drivers/media/dvb/ttpci/budget-av.c index e4c294656..072a6872d 100644 --- a/linux/drivers/media/dvb/ttpci/budget-av.c +++ b/linux/drivers/media/dvb/ttpci/budget-av.c @@ -46,8 +46,7 @@ struct budget_av { ****************************************************************************/ -static -u8 i2c_readreg (struct dvb_i2c_bus *i2c, u8 id, u8 reg) +static u8 i2c_readreg (struct dvb_i2c_bus *i2c, u8 id, u8 reg) { u8 mm1[] = {0x00}; u8 mm2[] = {0x00}; @@ -66,8 +65,7 @@ u8 i2c_readreg (struct dvb_i2c_bus *i2c, u8 id, u8 reg) } -static -int i2c_writereg (struct dvb_i2c_bus *i2c, u8 id, u8 reg, u8 val) +static int i2c_writereg (struct dvb_i2c_bus *i2c, u8 id, u8 reg, u8 val) { u8 msg[2]={ reg, val }; struct i2c_msg msgs; @@ -80,8 +78,7 @@ int i2c_writereg (struct dvb_i2c_bus *i2c, u8 id, u8 reg, u8 val) } -static const -u8 saa7113_tab[] = { +static const u8 saa7113_tab[] = { 0x01, 0x08, 0x02, 0xc0, 0x03, 0x33, @@ -111,8 +108,7 @@ u8 saa7113_tab[] = { }; -static -int saa7113_init (struct budget_av *budget_av) +static int saa7113_init (struct budget_av *budget_av) { struct budget *budget = &budget_av->budget; const u8 *data = saa7113_tab; @@ -136,8 +132,7 @@ int saa7113_init (struct budget_av *budget_av) } -static -int saa7113_setinput (struct budget_av *budget_av, int input) +static int saa7113_setinput (struct budget_av *budget_av, int input) { struct budget *budget = &budget_av->budget; @@ -155,8 +150,7 @@ int saa7113_setinput (struct budget_av *budget_av, int input) } -static -int budget_av_detach (struct saa7146_dev *dev) +static int budget_av_detach (struct saa7146_dev *dev) { struct budget_av *budget_av = (struct budget_av*) dev->ext_priv; int err; @@ -177,8 +171,7 @@ int budget_av_detach (struct saa7146_dev *dev) } -static -int budget_av_attach (struct saa7146_dev* dev, +static int budget_av_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) { struct budget_av *budget_av; @@ -255,8 +248,7 @@ static struct v4l2_input knc1_inputs[KNC1_INPUTS] = { }; -static -struct saa7146_extension_ioctls ioctls[] = { +static struct saa7146_extension_ioctls ioctls[] = { { VIDIOC_ENUMINPUT, SAA7146_EXCLUSIVE }, { VIDIOC_G_INPUT, SAA7146_EXCLUSIVE }, { VIDIOC_S_INPUT, SAA7146_EXCLUSIVE }, @@ -264,8 +256,7 @@ struct saa7146_extension_ioctls ioctls[] = { }; -static -int av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) +static int av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) { struct saa7146_dev *dev = fh->dev; struct budget_av *budget_av = (struct budget_av*) dev->ext_priv; @@ -308,15 +299,13 @@ int av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) return 0; } -static -struct saa7146_standard standard[] = { +static struct saa7146_standard standard[] = { { "PAL", V4L2_STD_PAL, SAA7146_PAL_VALUES }, { "NTSC", V4L2_STD_NTSC, SAA7146_NTSC_VALUES }, }; -static -struct saa7146_ext_vv vv_data = { +static struct saa7146_ext_vv vv_data = { .inputs = 2, .capabilities = 0, // perhaps later: V4L2_CAP_VBI_CAPTURE, but that need tweaking with the saa7113 .flags = 0, @@ -333,8 +322,7 @@ static struct saa7146_extension budget_extension; MAKE_BUDGET_INFO(knc1, "KNC1 DVB-S", BUDGET_KNC1); -static -struct pci_device_id pci_tbl [] = { +static struct pci_device_id pci_tbl [] = { MAKE_EXTENSION_PCI(knc1, 0x1131, 0x4f56), { .vendor = 0, @@ -343,8 +331,7 @@ struct pci_device_id pci_tbl [] = { MODULE_DEVICE_TABLE(pci, pci_tbl); -static -struct saa7146_extension budget_extension = { +static struct saa7146_extension budget_extension = { .name = "budget dvb /w video in\0", .pci_tbl = pci_tbl, @@ -359,8 +346,7 @@ struct saa7146_extension budget_extension = { }; -static -int __init budget_av_init(void) +static int __init budget_av_init(void) { DEB_EE((".\n")); @@ -371,8 +357,7 @@ int __init budget_av_init(void) } -static -void __exit budget_av_exit(void) +static void __exit budget_av_exit(void) { DEB_EE((".\n")); saa7146_unregister_extension(&budget_extension); diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c index 13105dceb..fb5347ace 100644 --- a/linux/drivers/media/dvb/ttpci/budget-ci.c +++ b/linux/drivers/media/dvb/ttpci/budget-ci.c @@ -74,8 +74,7 @@ void gpio_set(struct saa7146_dev* saa, u8 pin, u8 data) -static -int wait_for_debi_done(struct saa7146_dev *saa) +static int wait_for_debi_done(struct saa7146_dev *saa) { int start = jiffies; @@ -109,8 +108,7 @@ int wait_for_debi_done(struct saa7146_dev *saa) } -static -u32 debiread (struct saa7146_dev *saa, u32 config, int addr, int count) +static u32 debiread (struct saa7146_dev *saa, u32 config, int addr, int count) { u32 result = 0; @@ -137,8 +135,7 @@ u32 debiread (struct saa7146_dev *saa, u32 config, int addr, int count) /* DEBI during interrupt */ -static inline -u32 irdebi(struct saa7146_dev *saa, u32 config, int addr, u32 val, int count) +static inline u32 irdebi(struct saa7146_dev *saa, u32 config, int addr, u32 val, int count) { u32 res; res = debiread(saa, config, addr, count); @@ -154,8 +151,7 @@ u32 irdebi(struct saa7146_dev *saa, u32 config, int addr, u32 val, int count) Hauppauge (from NOVA-CI-s box product) i've taken a "middle of the road" approach and note the differences */ -static - u16 key_map[64] = { +static u16 key_map[64] = { /* 0x0X */ KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, @@ -205,8 +201,7 @@ static }; -static -void msp430_ir_debounce (unsigned long data) +static void msp430_ir_debounce (unsigned long data) { struct input_dev *dev = (struct input_dev *) data; @@ -223,8 +218,7 @@ void msp430_ir_debounce (unsigned long data) -static -void msp430_ir_interrupt (unsigned long data) +static void msp430_ir_interrupt (unsigned long data) { struct budget_ci *budget_ci = (struct budget_ci*) data; struct saa7146_dev *saa = budget_ci->budget.dev; @@ -262,8 +256,7 @@ void msp430_ir_interrupt (unsigned long data) } -static -int msp430_ir_init (struct budget_ci *budget_ci) +static int msp430_ir_init (struct budget_ci *budget_ci) { struct saa7146_dev *saa = budget_ci->budget.dev; int i; @@ -290,8 +283,7 @@ int msp430_ir_init (struct budget_ci *budget_ci) } -static -void msp430_ir_deinit (struct budget_ci *budget_ci) +static void msp430_ir_deinit (struct budget_ci *budget_ci) { struct saa7146_dev *saa = budget_ci->budget.dev; struct input_dev *dev = &budget_ci->input_dev; @@ -307,8 +299,7 @@ void msp430_ir_deinit (struct budget_ci *budget_ci) } -static -void budget_ci_irq (struct saa7146_dev *dev, u32 *isr) +static void budget_ci_irq (struct saa7146_dev *dev, u32 *isr) { struct budget_ci *budget_ci = (struct budget_ci*) dev->ext_priv; @@ -323,8 +314,7 @@ void budget_ci_irq (struct saa7146_dev *dev, u32 *isr) -static -int budget_ci_attach (struct saa7146_dev* dev, +static int budget_ci_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) { struct budget_ci *budget_ci; @@ -352,8 +342,7 @@ int budget_ci_attach (struct saa7146_dev* dev, -static -int budget_ci_detach (struct saa7146_dev* dev) +static int budget_ci_detach (struct saa7146_dev* dev) { struct budget_ci *budget_ci = (struct budget_ci*) dev->ext_priv; int err; @@ -375,8 +364,7 @@ static struct saa7146_extension budget_extension; MAKE_BUDGET_INFO(ttbci, "TT-Budget/WinTV-NOVA-CI PCI", BUDGET_TT_HW_DISEQC); -static -struct pci_device_id pci_tbl[] = { +static struct pci_device_id pci_tbl[] = { MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100c), MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100f), { @@ -386,8 +374,7 @@ struct pci_device_id pci_tbl[] = { MODULE_DEVICE_TABLE(pci, pci_tbl); -static -struct saa7146_extension budget_extension = { +static struct saa7146_extension budget_extension = { .name = "budget_ci dvb\0", .flags = 0, .ext_vv_data = NULL, @@ -402,8 +389,7 @@ struct saa7146_extension budget_extension = { }; -static -int __init budget_ci_init(void) +static int __init budget_ci_init(void) { if (saa7146_register_extension(&budget_extension)) return -ENODEV; @@ -412,8 +398,7 @@ int __init budget_ci_init(void) } -static -void __exit budget_ci_exit(void) +static void __exit budget_ci_exit(void) { DEB_EE((".\n")); saa7146_unregister_extension(&budget_extension); diff --git a/linux/drivers/media/dvb/ttpci/budget-core.c b/linux/drivers/media/dvb/ttpci/budget-core.c index f0a5d3592..632fe7321 100644 --- a/linux/drivers/media/dvb/ttpci/budget-core.c +++ b/linux/drivers/media/dvb/ttpci/budget-core.c @@ -7,8 +7,7 @@ int budget_debug = 0; * TT budget / WinTV Nova ****************************************************************************/ -static -int stop_ts_capture(struct budget *budget) +static int stop_ts_capture(struct budget *budget) { DEB_EE(("budget: %p\n",budget)); @@ -21,8 +20,7 @@ int stop_ts_capture(struct budget *budget) } -static -int start_ts_capture (struct budget *budget) +static int start_ts_capture (struct budget *budget) { struct saa7146_dev *dev=budget->dev; @@ -63,8 +61,7 @@ int start_ts_capture (struct budget *budget) } -static -void vpeirq (unsigned long data) +static void vpeirq (unsigned long data) { struct budget *budget = (struct budget*) data; u8 *mem = (u8 *)(budget->grabbing); @@ -101,8 +98,7 @@ void vpeirq (unsigned long data) * DVB API SECTION ****************************************************************************/ -static -int budget_start_feed(struct dvb_demux_feed *feed) +static int budget_start_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; struct budget *budget = (struct budget*) demux->priv; @@ -115,8 +111,7 @@ int budget_start_feed(struct dvb_demux_feed *feed) return start_ts_capture (budget); } -static -int budget_stop_feed(struct dvb_demux_feed *feed) +static int budget_stop_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; struct budget *budget = (struct budget *) demux->priv; @@ -127,8 +122,7 @@ int budget_stop_feed(struct dvb_demux_feed *feed) } -static -int budget_register(struct budget *budget) +static int budget_register(struct budget *budget) { struct dvb_demux *dvbdemux = &budget->demux; int ret; @@ -179,8 +173,7 @@ int budget_register(struct budget *budget) } -static -void budget_unregister(struct budget *budget) +static void budget_unregister(struct budget *budget) { struct dvb_demux *dvbdemux=&budget->demux; @@ -197,8 +190,7 @@ void budget_unregister(struct budget *budget) } -static -int master_xfer (struct dvb_i2c_bus *i2c, const struct i2c_msg msgs[], int num) +static int master_xfer (struct dvb_i2c_bus *i2c, const struct i2c_msg msgs[], int num) { struct saa7146_dev *dev = i2c->data; return saa7146_i2c_transfer(dev, msgs, num, 6); diff --git a/linux/drivers/media/dvb/ttpci/budget-patch.c b/linux/drivers/media/dvb/ttpci/budget-patch.c index 90ec7afbc..5ce7e02c4 100644 --- a/linux/drivers/media/dvb/ttpci/budget-patch.c +++ b/linux/drivers/media/dvb/ttpci/budget-patch.c @@ -39,16 +39,14 @@ static struct saa7146_extension budget_extension; MAKE_BUDGET_INFO(fs_1_3,"Siemens/Technotrend/Hauppauge PCI rev1.3+Budget_Patch", BUDGET_PATCH); -static -struct pci_device_id pci_tbl[] = { +static struct pci_device_id pci_tbl[] = { MAKE_EXTENSION_PCI(fs_1_3,0x13c2, 0x0000), { .vendor = 0, } }; -static -int wdebi(struct budget_patch *budget, u32 config, int addr, u32 val, int count) +static int wdebi(struct budget_patch *budget, u32 config, int addr, u32 val, int count) { struct saa7146_dev *dev=budget->dev; @@ -68,8 +66,7 @@ int wdebi(struct budget_patch *budget, u32 config, int addr, u32 val, int count) } -static -int SOutCommand(struct budget_patch *budget, u16* buf, int length) +static int SOutCommand(struct budget_patch *budget, u16* buf, int length) { int i; @@ -88,8 +85,7 @@ int SOutCommand(struct budget_patch *budget, u16* buf, int length) } -static -void av7110_set22k(struct budget_patch *budget, int state) +static void av7110_set22k(struct budget_patch *budget, int state) { u16 buf[2] = {( COMTYPE_AUDIODAC << 8) | (state ? ON22K : OFF22K), 0}; @@ -98,8 +94,7 @@ void av7110_set22k(struct budget_patch *budget, int state) } -static int -av7110_send_diseqc_msg(struct budget_patch *budget, int len, u8 *msg, int burst) +static int av7110_send_diseqc_msg(struct budget_patch *budget, int len, u8 *msg, int burst) { int i; u16 buf[18] = { ((COMTYPE_AUDIODAC << 8) | SendDiSEqC), @@ -166,12 +161,10 @@ int budget_patch_diseqc_ioctl (struct dvb_frontend *fe, unsigned int cmd, void * } -static -int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) +static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) { struct budget_patch *budget; int err; - int cnt; if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL))) return -ENOMEM; @@ -195,9 +188,8 @@ int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_d ** which seems that can be done perfectly without this :-)). */ -#define WRITE_RPS1(x) dev->d_rps1.cpu_addr[ cnt++ ] = cpu_to_le32(x) + // Setup RPS1 "program" (p35) - cnt = 0; // Setup RPS1 "program" (p35) // Wait reset Source Line Counter Threshold (p36) WRITE_RPS1(cpu_to_le32(CMD_PAUSE | RPS_INV | EVT_HS)); // Wait Source Line Counter Threshold (p36) @@ -236,8 +228,7 @@ int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_d } -static -int budget_patch_detach (struct saa7146_dev* dev) +static int budget_patch_detach (struct saa7146_dev* dev) { struct budget_patch *budget = (struct budget_patch*) dev->ext_priv; int err; @@ -253,8 +244,7 @@ int budget_patch_detach (struct saa7146_dev* dev) } -static -int __init budget_patch_init(void) +static int __init budget_patch_init(void) { if (saa7146_register_extension(&budget_extension)) return -ENODEV; @@ -263,16 +253,14 @@ int __init budget_patch_init(void) } -static -void __exit budget_patch_exit(void) +static void __exit budget_patch_exit(void) { DEB_EE((".\n")); saa7146_unregister_extension(&budget_extension); } -static -struct saa7146_extension budget_extension = { +static struct saa7146_extension budget_extension = { .name = "budget_patch dvb\0", .flags = 0, .ext_vv_data = NULL, diff --git a/linux/drivers/media/dvb/ttpci/budget.c b/linux/drivers/media/dvb/ttpci/budget.c index b5ed0d1a5..d3e17a84e 100644 --- a/linux/drivers/media/dvb/ttpci/budget.c +++ b/linux/drivers/media/dvb/ttpci/budget.c @@ -32,8 +32,7 @@ #include "budget.h" #include "dvb_functions.h" -static -void Set22K (struct budget *budget, int state) +static void Set22K (struct budget *budget, int state) { struct saa7146_dev *dev=budget->dev; DEB_EE(("budget: %p\n",budget)); @@ -45,8 +44,7 @@ void Set22K (struct budget *budget, int state) /* taken from the Skyvision DVB driver by Ralph Metzler <rjkm@metzlerbros.de> */ -static -void DiseqcSendBit (struct budget *budget, int data) +static void DiseqcSendBit (struct budget *budget, int data) { struct saa7146_dev *dev=budget->dev; DEB_EE(("budget: %p\n",budget)); @@ -58,8 +56,7 @@ void DiseqcSendBit (struct budget *budget, int data) } -static -void DiseqcSendByte (struct budget *budget, int data) +static void DiseqcSendByte (struct budget *budget, int data) { int i, par=1, d; @@ -75,8 +72,7 @@ void DiseqcSendByte (struct budget *budget, int data) } -static -int SendDiSEqCMsg (struct budget *budget, int len, u8 *msg, unsigned long burst) +static int SendDiSEqCMsg (struct budget *budget, int len, u8 *msg, unsigned long burst) { struct saa7146_dev *dev=budget->dev; int i; @@ -146,8 +142,7 @@ int budget_diseqc_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) } -static -int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) +static int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) { struct budget *budget = NULL; int err; @@ -174,8 +169,7 @@ int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *i } -static -int budget_detach (struct saa7146_dev* dev) +static int budget_detach (struct saa7146_dev* dev) { struct budget *budget = (struct budget*) dev->ext_priv; int err; @@ -203,8 +197,7 @@ MAKE_BUDGET_INFO(satel, "SATELCO Multimedia PCI", BUDGET_TT_HW_DISEQC); /* Uncomment for Budget Patch */ /*MAKE_BUDGET_INFO(fs_1_3,"Siemens/Technotrend/Hauppauge PCI rev1.3+Budget_Patch", BUDGET_PATCH);*/ -static -struct pci_device_id pci_tbl[] = { +static struct pci_device_id pci_tbl[] = { /* Uncomment for Budget Patch */ /*MAKE_EXTENSION_PCI(fs_1_3,0x13c2, 0x0000),*/ MAKE_EXTENSION_PCI(ttbs, 0x13c2, 0x1003), @@ -219,8 +212,7 @@ struct pci_device_id pci_tbl[] = { MODULE_DEVICE_TABLE(pci, pci_tbl); -static -struct saa7146_extension budget_extension = { +static struct saa7146_extension budget_extension = { .name = "budget dvb\0", .flags = 0, .ext_vv_data = NULL, @@ -235,8 +227,7 @@ struct saa7146_extension budget_extension = { }; -static -int __init budget_init(void) +static int __init budget_init(void) { if (saa7146_register_extension(&budget_extension)) return -ENODEV; @@ -245,8 +236,7 @@ int __init budget_init(void) } -static -void __exit budget_exit(void) +static void __exit budget_exit(void) { DEB_EE((".\n")); saa7146_unregister_extension(&budget_extension); |