alistair23-linux/drivers/staging
Ian Abbott 3a305a66bb staging: comedi: s626: remove encpriv macro
The `encpriv` macro relies on a local variable `dev` (of type `struct
comedi_device *`) being set correctly.  By a convoluted path involving
the `private` data pointer of subdevice 5 (the encoder (counter)
subdevice), the macro always yields a pointer to the first element of
the static array `enc_private_data[]`.  That holds statically constant
data for each of 6 encoder channels.

Instead of using the `encpriv` macro, just access the array it points to
directly and get rid of the macro.  Don't bother initializing the
`private` member of the encoder subdevice any more.  Since
`enc_private_data[]` now has nothing to so with subdevice private data,
rename `enc_private_data[]` to `s626_enc_chan_info[]` and rename its
type from `struct enc_private` to `struct s626_enc_info`.  Since the
array contains unchanging, static information, declare it `const` and
declare all the variables that point to it `const`.

A forward declaration of `s626_enc_chan_info[]` has been added
temporarily and will be removed by a later patch.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:20 -07:00
..
android
bcm Staging: bcm: line over 80 characters in Bcmnet.c 2013-10-07 18:39:32 -07:00
btmtk_usb Staging: btmtk_usb: Fix line length exceeding 80 characters using min_t macro 2013-10-11 13:17:54 -07:00
ced1401 ced1401: Convert driver to use get_user_pages_fast() 2013-10-05 17:52:58 -07:00
comedi staging: comedi: s626: remove encpriv macro 2013-10-11 15:34:20 -07:00
cptm1217
crystalhd Staging: crystalhd: Fix sparse warnings regarding static functions 2013-10-07 18:39:32 -07:00
cxt1e1 Staging:cxt1e1: Fixes whitespace around commas in sbew_ioc.h 2013-10-11 13:09:57 -07:00
dgap staging: dgap: tty.c: removes smatch warnings "redundant null check" 2013-09-25 16:18:10 -07:00
dgnc staging: dgnc: changes arguments in sizeof 2013-10-05 17:52:58 -07:00
dgrp
dwc2 staging: dwc2: Make dwc2_hw_params.host_channels large enough 2013-10-03 13:50:54 -07:00
echo
et131x
frontier
ft1000
fwserial
gdm72xx
gdm724x staging: gdm7240: fix memory leak on failure path 2013-10-11 15:23:14 -07:00
goldfish
iio Staging: iio: fix sizeof *ring should be sizeof(*ring) 2013-10-11 13:26:13 -07:00
imx-drm staging: drm/imx: Enable DRM PRIME support 2013-10-11 15:30:34 -07:00
keucr Staging: keucr: fix quoted string split across lines 2013-10-06 22:07:30 -07:00
ktap staging: ktap: add to the kernel tree 2013-10-11 10:58:32 -07:00
line6
lustre Staging: lustre: fix return is not a function, parentheses are not required in lo.c 2013-10-11 13:30:54 -07:00
media staging:go7007:Fix warning on quoted string on multiple lines 2013-10-11 13:39:30 -07:00
mt29f_spinand staging: mt29f_spinand: Use module_spi_driver 2013-10-11 15:23:14 -07:00
netlogic drivers: staging: netlogic.h: removed WARNING: extern prototypes should be avoided in .h files 2013-09-25 16:22:31 -07:00
nvec staging: nvec: fix space after if statement in nvec.c 2013-10-02 10:29:48 -07:00
octeon Staging: octeon: fix line over 80 characters in ethernet-tx.c 2013-10-11 13:52:01 -07:00
octeon-usb staging: octeon-usb: refactor __cvmx_usb_pipe_needs_split 2013-10-06 22:02:22 -07:00
olpc_dcon staging/olpc: fix dependencies to fix build errors 2013-09-30 18:47:00 -07:00
ozwpan
panel
phison
quickstart Staging / quickstart: remove reduplicate if(acpi_disabled) check 2013-09-25 16:48:45 -07:00
rtl8187se Staging: rtl8187se: suspect code indent for conditional statements in r8185b_init.c 2013-10-11 13:48:35 -07:00
rtl8188eu staging: r8188eu: Fix sparse warnings regarding static functions 2013-10-11 13:43:55 -07:00
rtl8192e staging: rtl8192e: Remove redundant pci_set_drvdata 2013-09-25 16:45:19 -07:00
rtl8192u Merge 3.12-rc3 into staging-next 2013-09-29 18:42:21 -07:00
rtl8712 Staging: rtl8712: fix spaces before semicolons 2013-10-03 13:50:54 -07:00
rts5139
sb105x
sbe-2t3e3
sep sep: Convert sep_lock_user_pages() to get_user_pages_fast() 2013-10-05 17:52:58 -07:00
serqt_usb2
silicom staging: silicom: fix space prohibited before semicolon 2013-10-02 16:22:01 -07:00
slicoss
sm7xxfb Staging: sm7xxfb: fix line over 80 characters in sm7xxfb.c 2013-10-11 13:52:01 -07:00
speakup staging: speakup: str initialization replaced with NULL where it was initialized with int 2013-10-03 13:50:54 -07:00
ste_rmi4
tidspbridge Staging: tidspbridge: fix no space before tabs 2013-10-06 22:07:30 -07:00
usbip staging: usbip: Fix man-pages for usbip userspace utilities 2013-09-25 16:58:32 -07:00
vme
vt6655 staging: vt6655: don't leak when returning -EOPNOTSUPP in vt6655_hostap_ioctl 2013-09-30 18:34:00 -07:00
vt6656 staging: vt6656: make pControlURB available life time of driver. 2013-10-11 15:23:14 -07:00
winbond Staging: winbond: reg: white space deleted 2013-09-25 16:41:22 -07:00
wlags49_h2
wlags49_h25
wlan-ng Staging: wlan-ng: fix sparse warnings for static functions 2013-10-11 13:26:13 -07:00
xgifb Staging: xgifb: braces {} are not necessary for single statement in vb_setmode 2013-10-07 18:39:32 -07:00
xillybus staging: xillybus: Use module_platform_driver 2013-10-11 15:23:14 -07:00
zram
zsmalloc zsmalloc: Fix "map_vm_area" undefined reference errors. 2013-10-11 15:23:13 -07:00
Kconfig staging: ktap: add to the kernel tree 2013-10-11 10:58:32 -07:00
Makefile staging: ktap: add to the kernel tree 2013-10-11 10:58:32 -07:00
staging.c