From 9abeb196a740bd52401a24108df27e20576da036 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 24 Jul 2013 12:11:25 -0700 Subject: [PATCH] staging: comedi: ii_pci20kc.c: cleanup the dio subdevice For asethetics, redefine the register map for the carrier board. The 'PCI*' names lead one to think this is a PCI board not a legacy ISA board. Remove the #if 0'd out pci20xxx_{do,di}() functions. They are not needed. Rename, and fix, the pci20xxx_dio_config() function. The control and direction registers are not readable. Use the new register map defines instead of the crazy bit shifts. Rename, and fix, the pci20xxx_dio_insn_config() function. This function should treat data[0] as the 'instruction' to handle not just use it to determine if the port is an input or output. Rename, and tix, the pci20xxx_dio_insn_bits() function. The 'state' only needs to be updated if the 'mask' indicates. For aesthetics, abosrb the pci20xxx_dio_init() into the (*attach) function. Fix the carrier board id detect in the (*attach). There are two carrier board types, one with 32 dio channels and one without. Use this info when setting up the dio subdevice. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed