diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-16 11:59:49 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-18 13:44:51 +0300 |
commit | 7b61ba8ff838dbee422d428fbd882ab83db4b2d9 (patch) | |
tree | caa863cac4a8e249bdaa8f4016e76d52ea467306 /drivers/media/pci/cx88/cx88-input.c | |
parent | 65bc2fe86e667077b38a63ce6cb40677be09bc4f (diff) | |
download | linux-7b61ba8ff838dbee422d428fbd882ab83db4b2d9.tar.xz |
[media] cx88: make checkpatch happier
This driver is old, and have lots of checkpatch violations.
As we're touching a lot on this driver due to the printk
conversions, let's run checkpatch --fix on it, in order to
solve some of those issues.
Also, do a few manual adjustments:
- remove the FSF address and use the usual coding style
for the initial comments;
- use WARN_ON() instead of BUG_ON();
- remove an unused typedef;
- break a few long lines.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/cx88/cx88-input.c')
-rw-r--r-- | drivers/media/pci/cx88/cx88-input.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/media/pci/cx88/cx88-input.c b/drivers/media/pci/cx88/cx88-input.c index 3a05629ba6e4..c072b7ecc8d6 100644 --- a/drivers/media/pci/cx88/cx88-input.c +++ b/drivers/media/pci/cx88/cx88-input.c @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cx88.h" @@ -58,7 +54,7 @@ struct cx88_IR { u32 mask_keyup; }; -static unsigned ir_samplerate = 4; +static unsigned int ir_samplerate = 4; module_param(ir_samplerate, uint, 0444); MODULE_PARM_DESC(ir_samplerate, "IR samplerate in kHz, 1 - 20, default 4"); @@ -67,10 +63,10 @@ module_param(ir_debug, int, 0644); /* debug level [IR] */ MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]"); #define ir_dprintk(fmt, arg...) if (ir_debug) \ - printk(KERN_DEBUG "%s IR: " fmt , ir->core->name , ##arg) + printk(KERN_DEBUG "%s IR: " fmt, ir->core->name, ##arg) #define dprintk(fmt, arg...) if (ir_debug) \ - printk(KERN_DEBUG "cx88 IR: " fmt , ##arg) + printk(KERN_DEBUG "cx88 IR: " fmt, ##arg) /* ---------------------------------------------------------------------- */ @@ -97,7 +93,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir) auxgpio = cx_read(MO_GP1_IO); /* Take out the parity part */ - gpio=(gpio & 0x7fd) + (auxgpio & 0xef); + gpio = (gpio & 0x7fd) + (auxgpio & 0xef); break; case CX88_BOARD_WINFAST_DTV1000: case CX88_BOARD_WINFAST_DTV1800H: @@ -512,7 +508,7 @@ int cx88_ir_fini(struct cx88_core *core) struct cx88_IR *ir = core->ir; /* skip detach on non attached boards */ - if (NULL == ir) + if (ir == NULL) return 0; cx88_ir_stop(core); @@ -530,7 +526,7 @@ void cx88_ir_irq(struct cx88_core *core) { struct cx88_IR *ir = core->ir; u32 samples; - unsigned todo, bits; + unsigned int todo, bits; struct ir_raw_event ev; if (!ir || !ir->sampling) @@ -602,7 +598,7 @@ void cx88_i2c_init_ir(struct cx88_core *core) const unsigned short *addr_list = default_addr_list; const unsigned short *addrp; /* Instantiate the IR receiver device, if present */ - if (0 != core->i2c_rc) + if (core->i2c_rc != 0) return; memset(&info, 0, sizeof(struct i2c_board_info)); |