Staging: cx25821: fix coding style issues
Subsystems (2)
PATCH v2 1/1 Staging: cx25821: fix coding style issues
Fix too long lines in cx25821-audio.h
Fix wrong brace placement in cx25821-cards.c, cx25821-core.c, and cx25821-i2c.c
Use DEFINE_PCI_DEVICE_TABLE for cx25821_pci_tbl.
Move EXPORT_SYMBOL(cx25821_set_gpiopin_direction) to the right place. Delete file cx25821-gpio.h since it is not used.
Get rid of typedef in cx25821.h.
--- drivers/staging/cx25821/cx25821-audio.h | 6 ++++-- drivers/staging/cx25821/cx25821-cards.c | 2 +- drivers/staging/cx25821/cx25821-core.c | 7 +++---- drivers/staging/cx25821/cx25821-gpio.c | 1 + drivers/staging/cx25821/cx25821-gpio.h | 2 -- drivers/staging/cx25821/cx25821-i2c.c | 6 +++--- drivers/staging/cx25821/cx25821.h | 8 +++++--- 7 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 drivers/staging/cx25821/cx25821-gpio.h
drivers/staging/cx25821/cx25821-audio.h +4 -2
@@ -36,13 +36,15 @@*/ #ifndef USE_RISC_NOOP #define MAX_BUFFER_PROGRAM_SIZE \ - (2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE*4) + (2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + \ + RISC_WRITECR_INSTRUCTION_SIZE*4)#endif /* MAE 12 July 2005 Try to use NOOP RISC instruction instead */ #ifdef USE_RISC_NOOP #define MAX_BUFFER_PROGRAM_SIZE \ - (2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_NOOP_INSTRUCTION_SIZE*4) + (2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + \ + RISC_NOOP_INSTRUCTION_SIZE*4)#endif /* Sizes of various instructions in bytes. Used when adding instructions. */
drivers/staging/cx25821/cx25821-cards.c +1 -1
@@ -57,7 +57,7 @@ struct cx25821_subid cx25821_subids[] = { .subvendor = 0x14f1, .subdevice = 0x0920, .card = CX25821_BOARD, - }, + }, };void cx25821_card_setup (struct cx25821_dev *dev)
drivers/staging/cx25821/cx25821-core.c +3 -4
@@ -1473,17 +1473,17 @@ static void __devexit cx25821_finidev(struct pci_dev *pci_dev)kfree (dev); } -static struct pci_device_id cx25821_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE (cx25821_pci_tbl) = { {/* CX25821 Athena */ .vendor =0x14f1 , .device =0x8210 , .subvendor =0x14f1 , .subdevice =0x0920 , - }, + }, {/* --- end of list --- */ - } + } };MODULE_DEVICE_TABLE (pci, cx25821_pci_tbl);
@@ -1512,7 +1512,6 @@ static void __exit cx25821_fini(void)pci_unregister_driver (&cx25821_pci_driver); } -EXPORT_SYMBOL (cx25821_set_gpiopin_direction);module_init (cx25821_init);module_exit (cx25821_fini);
drivers/staging/cx25821/cx25821-gpio.c +1 -0
@@ -50,6 +50,7 @@ void cx25821_set_gpiopin_direction(struct cx25821_dev *dev,cx_write (gpio_oe_reg, value); } +EXPORT_SYMBOL (cx25821_set_gpiopin_direction);static void cx25821_set_gpiopin_logicvalue (struct cx25821_dev *dev,int pin_number,int pin_logic_value)
drivers/staging/cx25821/cx25821-gpio.h deleted +0 -2
@@ -1,2 +0,0 @@ - -void cx25821_gpio_init (struct athena_dev *dev);
drivers/staging/cx25821/cx25821-i2c.c +3 -3
@@ -374,12 +374,12 @@ int cx25821_i2c_read(struct cx25821_i2c *bus, u16 reg_addr, int *value) .flags = 0, .len = 2, .buf = addr, - }, { + }, { .addr = client->addr, .flags = I2C_M_RD, .len = 4, .buf = buf, - } + } }; addr[0 ] = (reg_addr >>8 );
@@ -407,7 +407,7 @@ int cx25821_i2c_write(struct cx25821_i2c *bus, u16 reg_addr, int value) .flags = 0, .len = 6, .buf = buf, - } + } }; buf[0 ] = reg_addr >>8 ;
drivers/staging/cx25821/cx25821.h +5 -3
@@ -179,15 +179,17 @@ struct cx25821_input {u32 gpio0, gpio1, gpio2, gpio3; }; -typedef enum { +enum port {CX25821_UNDEFINED =0 ,CX25821_RAW ,CX25821_264 -}port_t ; +};struct cx25821_board {char *name; -port_t porta, portb, portc; +enum port porta; +enum port portb; +enum port portc;unsigned int tuner_type;unsigned int radio_type;unsigned char tuner_addr;
Signature · 1 line
1.7.0.4
Quoted 7 lines · Leonid V. Fedorenchik
Fix too long lines in
cx25821-audio.h
Fix wrong brace placement incx25821-cards.c,cx25821-core.c, andcx25821-i2c.c
UseDEFINE_PCI_DEVICE_TABLEforcx25821_pci_tbl.
MoveEXPORT_SYMBOL(cx25821_set_gpiopin_direction)to the right place. Delete filecx25821-gpio.hsince it is not used.
Get rid of typedef incx25821.h.
I prefer to get patches in a "one patch per thing you did" format.
So, care to split this up into a number of smaller patches, all doing the individual thing you list above?
Yes, it's going to be a bunch of small patches, but then they will be "obviously" correct and trivial to review and apply.
thanks,
greg k-h
Quoted 14 lines · On Tue, 23 Aug 2011 14:44:21 -0700 Greg KH <[email protected]> wrote:
Quoted 7 lines · Leonid V. Fedorenchik
Fix too long lines in
cx25821-audio.h
Fix wrong brace placement incx25821-cards.c,cx25821-core.c, andcx25821-i2c.c
UseDEFINE_PCI_DEVICE_TABLEforcx25821_pci_tbl.
MoveEXPORT_SYMBOL(cx25821_set_gpiopin_direction)to the right place. Delete filecx25821-gpio.hsince it is not used.
Get rid of typedef incx25821.h.I prefer to get patches in a "one patch per thing you did" format.
So, care to split this up into a number of smaller patches, all doing the individual thing you list above?
Quoted 6 lines
Yes, it's going to be a bunch of small patches, but then they will be "obviously" correct and trivial to review and apply.
thanks,
greg k-h
OK, no problem. I'll do this.
Leonid V. Fedorenchik