Commit Graph

11157 Commits (5e8e19bf6c3c9d8ecf74e2a7fdae99a76949bdf6)

Author SHA1 Message Date
Aaro Koskinen 9ffc7e9fee staging: xgifb: vb_setmode: eliminate GetVGAType/Set_VGAType
Eliminate unneeded function and struct field. The same information is
available in HwDeviceExtension->jChipType.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 06:20:13 +09:00
Aaro Koskinen fac2cc9205 staging: xgifb: vb_setmode: make internal functions static
Make internal functions static.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 06:20:12 +09:00
Aaro Koskinen ed2e7203c3 staging: xgifb: vb_setmode: make XGI_GetLVDSOEMTableIndex() static
XGI_GetLVDSOEMTableIndex() can be made static. Move the function, so that
forward declaration is not needed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 06:20:12 +09:00
Aaro Koskinen 9913b6c0d7 staging: xgifb: vb_setmode: make XGI_XG21SetPanelDelay() static
XGI_XG21SetPanelDelay() can be made static. Move the function, so that
forward declaration is not needed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 06:20:12 +09:00
Aaro Koskinen 776115a0eb staging: xgifb: vb_setmode: make XGI_XG27BLSignalVDD() static
XGI_XG27BLSignalVDD() can be made static. Move the function, so that
forward declaration is not needed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 06:20:12 +09:00
Aaro Koskinen 0ebf538b8a staging: xgifb: vb_setmode: make XGI_XG21BLSignalVDD() static
XGI_XG21BLSignalVDD() can be made static. Move the function, so that
forward declaration is not needed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 06:20:12 +09:00
Aaro Koskinen a2d08cf38a staging: xgifb: vb_setmode: make XGI_SetXG27FPBits() static
XGI_SetXG27FPBits() can be made static. Move the function, so that
forward declaration is not needed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 06:20:11 +09:00
Aaro Koskinen e85f203696 staging: xgifb: vb_setmode: make XGI_SetXG21FPBits() static
XGI_SetXG21FPBits() can be made static. Move the function, so that
forward declaration is not needed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 06:20:11 +09:00
Aaro Koskinen 0646596cc7 staging: xgifb: vb_setmode: make XGI_GetResInfo() static
XGI_GetResInfo() can be made static. Move the function, so that forward
declaration is not needed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 06:20:11 +09:00
Aaro Koskinen 7f04ec3058 staging: xgifb: vb_setmode: make XGI_LongWait() static
XGI_LongWait() can be made static. Move the function, so that forward
declaration is not needed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 06:20:11 +09:00
Xi Wang dfd8ee92a9 Staging: comedi: fix integer overflow in do_insnlist_ioctl()
There is a potential integer overflow in do_insnlist_ioctl() if
userspace passes in a large insnlist.n_insns.  The call to kmalloc()
would allocate a small buffer, leading to a memory corruption.

The bug was reported by Dan Carpenter <dan.carpenter@oracle.com>
and Haogang Chen <haogangchen@gmail.com>.  The patch was suggested by
Ian Abbott <abbotti@mev.co.uk> and Lars-Peter Clausen <lars@metafoo.de>.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Haogang Chen <haogangchen@gmail.com>.
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 04:38:45 +09:00
Greg Kroah-Hartman 06b446c8af Revert "Staging: comedi: integer overflow in do_insnlist_ioctl()"
This reverts commit e384a41141.
It's not the correct way to solve this issue.

Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 04:36:10 +09:00
Peter Huewe c0fe602f2d staging/sm7xx: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 04:24:32 +09:00
Peter Huewe 5fef30b282 staging/wlags49_h2: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since CH_Agere_Systems_Mini_PCI_V1 is defined as 0 in hermes_pci_versions
and neither the enum nor the value is used anywhere else, we can drop
the assignment of .driver_data as it is initialized as 0 by default.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 04:24:32 +09:00
Peter Huewe dcbc2fc62c staging/phison: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 04:24:32 +09:00
Jonathan Cameron 0c22db439a staging:iio:documentation: document filter_low_pass_3db_frequency.
Add the sysfs ABI docs for all current instances of this
parameter.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 04:22:23 +09:00
Jonathan Cameron 98c9373d31 staging:iio:imu:adis16400 add control of data filtering.
Bartlett filter used.  Values read of figures on datasheet
so far from precise.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 04:22:23 +09:00
Jonathan Cameron df94aba81f staging:iio: filter description - low pass 3db frequency.
Introduce the first data filtering related parameter.
For now we are ignoring the filter type and merely specifying its
approximate (I read them off tiny graphs) 3db point.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28 04:22:23 +09:00
Ravishankar karkala Mallikarjunayya 0389245f0c Staging: comedi: fix brace coding style issue in pcmuio.c
This is a patch to the pcmuio.c file that fixes up a brace
warning found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:51:41 -08:00
Ravishankar karkala Mallikarjunayya 34dac67d6c Staging: comedi: fix printk issue in ni_pcimio.c
This is a patch to the ni_pcimio.c file that fixes up a printk
warning found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:51:40 -08:00
Ravishankar karkala Mallikarjunayya e8f31fd312 Staging: comedi: fix printk issue in ni_pcimio.c
This is a patch to the ni_pcimio.c file that fixes up a printk
warning found by the checkpatch.pl tool.
Converted printks to dev_<level> and pr_<level>.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:51:40 -08:00
Ravishankar karkala Mallikarjunayya 25c0ca8406 Staging: comedi: fix brace coding style issue in ni_pcimio.c
This is a patch to the ni_pcimio.c file that fixes up a brace
warning found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:51:40 -08:00
Ravishankar karkala Mallikarjunayya 327ffc0ce7 Staging: comedi: fix printk issue in ni_labpc_cs.c
This is a patch to the ni_labpc_cs.c file that fixes up a printk
warning found by the checkpatch.pl tool

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:51:40 -08:00
Ravishankar karkala Mallikarjunayya 1aa301e83b Staging: comedi: fix printk issue in ni_daq_dio24.c
This is a patch to the ni_daq_dio24.c file that fixes up a printk
warning found by the checkpatch.pl tool.
Converted printks to pr_<levels> and dev_version.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:51:40 -08:00
Ravishankar karkala Mallikarjunayya ef7908ebc3 Staging: comedi: fix brace coding style issue in ni_daq_dio24.c
This is a patch to the ni_daq_dio24.c file that fixes up a
brace warning found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:51:40 -08:00
Ravishankar karkala Mallikarjunayya 73b12a5bc0 Staging: comedi: fix initialise statics to 0 or NULL issue in ni_daq_dio24.c
This is a patch to the ni_daq_dio24.c file that fixes up a initialise
statics to 0 or NULL warning found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:51:40 -08:00
Ravishankar karkala Mallikarjunayya 408f6bcd2a Staging: comedi: fix printk issue in pcl818.c
This is a patch to the pcl818.c file that fixes up a printk
warning found by the checkpatch.pl tool.
Removed an unnecessary printks.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:50:46 -08:00
Ravishankar karkala Mallikarjunayya c62a0ef42c Staging: comedi: fix printk issue in pcl818.c
This is a patch to the pcl818.c file that fixes up a printk
warning found by the checkpatch.pl tool.
Converted printks to dev_version.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:50:46 -08:00
Ravishankar karkala Mallikarjunayya 26ba666c50 Staging: comedi: fix printk issue in pcl818.c
This is a patch to the pcl818.c file that fixes up a printk
warning found by the checkpatch.pl tool

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:50:46 -08:00
Ravishankar karkala Mallikarjunayya 3478f74231 Staging: comedi: fix printk issue in das16m1.c
This is a patch to the das16m1.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to comedi_<level.
Removed an unnecessary printk statment.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:50:46 -08:00
Ravishankar karkala Mallikarjunayya b147ed6077 Staging: comedi: fix initialise statics to 0 or NULL issue in pcl816.c
This is a patch to the pcl816.c file that fixes up a initialise statics to 0 or NULL
warning found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:50:45 -08:00
Ravishankar karkala Mallikarjunayya 352f91747f Staging: comedi: fix brace coding style issue in daqboard2000.c
This is a patch to the daqboard2000.c file that fixes up a brace
warning found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:50:45 -08:00
Ravishankar karkala Mallikarjunayya 61a8d9550e Staging: comedi: fix printk issue in das08_cs.c
This is a patch to the das08_cs.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_printk.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:48:03 -08:00
Ravishankar karkala Mallikarjunayya f15d651b14 Staging: comedi: fix printk issue in adv_pci_dio.c
This is a patch to the adv_pci_dio.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_version.
Removed unnecessary printk statements.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:48:03 -08:00
Ravishankar karkala Mallikarjunayya e75aca9286 Staging: comedi: fix printk issue in das800.c
This is a patch to the das800.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_dbg.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:48:03 -08:00
Ravishankar karkala Mallikarjunayya bb1defe465 Staging: comedi: fix printk issue in das800.c
This is a patch to the das800.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_version.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:48:03 -08:00
Ravishankar karkala Mallikarjunayya 5d2d50745c Staging: comedi: fix printk issue in cb_pcimdas.c
This is a patch to the cb_pcimdas.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_version.
Removed ifdef CBPCIMDAS_DEBUG and unecessary printk statements.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:48:03 -08:00
Ravishankar karkala Mallikarjunayya 3f00cf8ff3 Staging: comedi: fix printk issue in cb_pcimdas.c
This is a patch to the cb_pcimdas.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_version.
Removed ifdef CBPCIMDAS_DEBUG.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:48:02 -08:00
Ravishankar karkala Mallikarjunayya 2c6abc58f2 Staging: comedi: fix printk issue in cb_pcimdas.c
This is a patch to the cb_pcimdas.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_printk.
Removed unnecessary printk statements.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:48:02 -08:00
Ravishankar karkala Mallikarjunayya 610b8ed959 Staging: comedi: fix printk issue in cb_pcidio.c
This is a patch to the cb_pcidio.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_printk and Removed unnecessary printk
statements.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:48:02 -08:00
Ravishankar karkala Mallikarjunayya 143c128cc1 Staging: comedi: fix printk issue in cb_pcidda.c
This is a patch to the cb_pcidda.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_printk and Removed unnecessary
printk statements.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:45:19 -08:00
Ravishankar karkala Mallikarjunayya 8bde85db94 Staging: comedi: fix printk issue in cb_pcidas.c
This is a patch to the cb_pcidas.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_printk and Removed unnecessary
printk statements.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:45:19 -08:00
Ravishankar karkala Mallikarjunayya be545c6251 Staging: comedi: fix printk issue in adv_pci1710.c
This is a patch to the adv_pci1710.c file that fixes up a printk
warning found by the checkpatch.pl tool.

Converted printks to dev_version and Removed an unnecessary printk
statements.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:45:19 -08:00
Ravishankar karkala Mallikarjunayya 4547251f6a Staging: comedi: fix brace coding style issue in das16m1.c
This is a patch to the das16m1.c file that fixes up a brace coding
warning found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:45:18 -08:00
Ravishankar karkala Mallikarjunayya 2b8731348a Staging: comedi: fix NULL initilization issue in pcl818.c
This is a patch to the pcl818.c file that fixes up a NULL initilization
warning found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:45:18 -08:00
Ravishankar karkala Mallikarjunayya fc95013963 Staging: comedi: fix brace coding style issue in pcl818.c
This is a patch to the pcl818.c file that fixes up a brace
coding style warning found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:45:18 -08:00
Ravishankar karkala Mallikarjunayya cc780e8f92 Staging: comedi: fix printk issue in cb_das16_cs.c
This is a patch to the cb_das16_cs.c file that fixes up a printk
warning found by the checkpatch.pl tool.

Converted printks to dev_printk.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:45:18 -08:00
Ravishankar karkala Mallikarjunayya 3dbeb83c24 Staging: comedi: fix printk issue in serial2002.c
This is a patch to the serial2002.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_version.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:45:18 -08:00
Ravishankar karkala Mallikarjunayya 7e4198f47b Staging: comedi: fix printk issue in das6402.c
This is a patch to the das6402.c file that fixes up a printk
warning found by the checkpatch.pl tool.

Converted printks to dev_version.
Removed unnecessary printk statements.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:45:18 -08:00
Peter Huewe 855f62ef19 staging/comedi/daqboard: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:37 -08:00
Peter Huewe 7b0be12b26 staging/comedi/amplc: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:37 -08:00
Peter Huewe 8c0690eaf7 staging/comedi/adl: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:37 -08:00
Peter Huewe 71d4c80db1 staging/comedi/cb_pcimdda: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:37 -08:00
Peter Huewe 8edbfb8dec staging/comedi/das08: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:36 -08:00
Peter Huewe dbecdf36ce staging/comedi/me_daq: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:36 -08:00
Peter Huewe 9fb7d6fa1d staging/comedi/contec: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:36 -08:00
Peter Huewe 49d6f67245 staging/comedi/ke_counter: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:36 -08:00
Peter Huewe 1013762ccf staging/comedi/jr3: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:36 -08:00
Peter Huewe d9fcd77b56 staging/comedi/addi: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Moreover the hardcoded 0x15B8 was replaced by the more readable
PCI_VENDOR_ID_ADDIDATA

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:36 -08:00
Johannes Thumshirn cf5682788f staging: comedi: Unbreak output of printk()s in pcmmio
Unbreak the output of some printk()s I broke.

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:39:36 -08:00
Dan Carpenter e384a41141 Staging: comedi: integer overflow in do_insnlist_ioctl()
There is an integer overflow here that could cause memory corruption
on 32 bit systems.

insnlist.n_insns could be a very high value size calculation for
kmalloc() could overflow resulting in a smaller "insns" than
expected.  In the for (i = 0; i < insnlist.n_insns; i++) {... loop
we would read past the end of the buffer, possibly corrupting memory
as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:34:15 -08:00
Federico Vaga 6a9ce6b654 Staging: comedi: fix signal handling in read and write
After sleeping on a wait queue, signal_pending(current) should be
checked (not before sleeping).

Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:34:15 -08:00
Federico Vaga df30b21cb0 Staging: comedi: fix mmap_count
In comedi_fops, mmap_count is decremented at comedi_vm_ops->close but
it is not incremented at comedi_vm_ops->open. This may result in a negative
counter.  The patch introduces the open method to keep the counter
consistent.

The bug was triggerd by this sample code:

        mmap(0, ...., comedi_fd);
        fork();
        exit(0);

Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:34:14 -08:00
Bernd Porr 3ffab428f4 staging: comedi: fix oops for USB DAQ devices.
This fixes kernel oops when an USB DAQ device is plugged out while it's
communicating with the userspace software.

Signed-off-by: Bernd Porr <berndporr@f2s.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:34:14 -08:00
Bernd Porr 8b78607fc4 staging: comedi: usbduxsigma: Fixed wrong range for the analogue channel.
It's actually +/-2.65V/2 and not +/-2.65V.

Signed-off-by: Bernd Porr <berndporr@f2s.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:34:14 -08:00
Christopher Brannon 4afaee1561 Staging: speakup: Don't try to access an unallocated struct.
In speakup_init, we have the following:
	if (quiet_boot)
		spk_shut_up |= 0x01;
And in spk_types.h:
This patch moves the statement in speakup_init so that
speakup_console[vc->vc_num] is guaranteed to be allocated when it
executes.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:13:55 -08:00
Bernhard Heinloth ebadb73043 Staging: zcache: Fix calls to obsolete function
Function "strict_strtol" replaced by "kstrtol" as suggested by the checkpatch script

Signed-off-by: Bernhard Heinloth <bernhard@heinloth.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:13:55 -08:00
Ken O'Brien a75311dcb8 Staging: frontier: Removed use of obsolete function
Replaced one reference to strict_strtoul() to kstrtoul().

Signed-off-by: Ken O'Brien <kernel@kenobrien.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:13:54 -08:00
Ken O'Brien 67d6baa401 Staging: asus_oled: Fixed use of obsolete function.
Removed use of obsolete function "strict_strtoul". Replaced with "kstrtoul"
as suggested by checkpatch.pl

Signed-off-by: Ken O'Brien <kernel@kenobrien.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:13:54 -08:00
Omar Ramirez Luna 3b9cd5d114 staging: tidspbridge: request dmtimer clocks on init
Given that dm timer framework doesn't support request of clocks
by soft | hard irqs because some recent changes, tidspbridge needs
to request its clocks on init and enable/disable them on demand.

This was first seen on 3.2-rc1.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:12:57 -08:00
Omar Ramirez Luna 9b0a3f985a staging: tidspbridge: include module.h by default
Fixes compilation break when compiled as part of the kernel:

drivers/staging/tidspbridge/rmgr/drv_interface.c:134: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: type defaults to 'int' in declaration of 'MODULE_VERSION'
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c: In function 'omap34_xx_bridge_probe':
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: 'THIS_MODULE' undeclared (first use in this function)
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: (Each undeclared identifier is reported only once
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: for each function it appears in.)

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:12:57 -08:00
Thomas Meyer 1aa5eb67d7 Staging: speakup: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:12:56 -08:00
Alexander Beregalov cd420765eb Staging: cxt1e1: remove rcs keywords and log
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:11:35 -08:00
Alexander Beregalov 48d7c08f0f Staging: cxt1e1: remove ifdef __cplusplus
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:11:35 -08:00
Alexander Beregalov 05c0cb4e40 Staging: cxt1e1: remove unnecessary includes
Remove *BSD, SunOS and userspace includes.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:11:35 -08:00
Aaro Koskinen 15eac0f847 staging: xgifb: delete vb_ext.{c,h}
Delete empty files.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:03:18 -08:00
Aaro Koskinen 40544b0411 staging: xgifb: move XGINew_SenseLCD() to vb_init.c
The function is used only in vb_init.c, so move it there and make
it static.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:02:56 -08:00
Aaro Koskinen 7a809f5c20 staging: xgifb: rename XGINew_GetLCDDDCInfo() to XGINew_SenseLCD()
Eliminate an unnecessary wrapper function.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:02:24 -08:00
Aaro Koskinen f1c289115a staging: xgifb: delete XGI_GetSenseStatus()
Delete unused function XGI_GetSenseStatus().

Static functions XGINew_Is301B(), XGINew_Sense(), XGINew_GetPanelID(),
XGINew_BridgeIsEnable() and XGINew_SenseHiTV() can be deleted as well,
since they are not used anymore.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:02:10 -08:00
Peter Huewe 27d73f1a5a staging/xgifb: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readability.

v2:
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
(found by Aaro Koskinen)

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:00:09 -08:00
Rob Clark cd5351f4d2 staging: add omapdrm DRM/KMS driver for TI OMAP platforms
A DRM display driver for TI OMAP platform.  Similar to omapfb (fbdev)
and omap_vout (v4l2 display) drivers in the past, this driver uses the
DSS2 driver to access the display hardware, including support for
HDMI, DVI, and various types of LCD panels.  And it implements GEM
support for buffer allocation (for KMS as well as offscreen buffers
used by the xf86-video-omap userspace xorg driver).

The driver maps CRTCs to overlays, encoders to overlay-managers, and
connectors to dssdev's.  Note that this arrangement might change slightly
when support for drm_plane overlays is added.

For GEM support, non-scanout buffers are using the shmem backed pages
provided by GEM core (In drm_gem_object_init()).  In the case of scanout
buffers, which need to be physically contiguous, those are allocated
with CMA and use drm_gem_private_object_init().

See userspace xorg driver:
git://github.com/robclark/xf86-video-omap.git

Refer to this link for CMA (Continuous Memory Allocator):
http://lkml.org/lkml/2011/8/19/302

Links to previous versions of the patch:
v1: http://lwn.net/Articles/458137/
v2: http://patches.linaro.org/4156/
v3: http://patches.linaro.org/4688/
v4: http://patches.linaro.org/4791/

History:

v5: move headers from include/drm at Greg KH's request, minor rebasing
    on 3.2-rc1, pull in private copies of drm_gem_{get,put}_pages()
    because "drm/gem: add functions to get/put pages" patch is not
    merged yet
v4: bit of rework of encoder/connector _dpms() code, modeset_init()
    rework to not use nested functions, update TODO.txt
v3: minor cleanups, improved error handling for dev_load(), some minor
    API changes that will be needed later for tiled buffer support
v2: replace omap_vram with CMA for scanout buffer allocation, remove
    unneeded functions, use dma_addr_t for physical addresses, error
    handling cleanup, refactor attach/detach pages into common drm
    functions, split non-userspace-facing API into omap_priv.h, remove
    plugin API

v1: original

Signed-off-by: Rob Clark <rob@ti.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:43:30 -08:00
wwang f7364ba04b staging:rts_pstor:Complete scanning_done variable
Complete scanning_done variable if rtsx-scan thread created failed.

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:37:39 -08:00
Bart Westgeest 438957f8d4 staging: usbip: bugfix for deadlock
Interrupts must be disabled prior to calling usb_hcd_unlink_urb_from_ep.
If interrupts are not disabled, it can potentially lead to a deadlock.
The deadlock is readily reproduceable on a slower (ARM based) device
such as the TI Pandaboard.

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:37:38 -08:00
Greg Kroah-Hartman be7f39c5ec Staging: delete spectra driver
To quote Alan:
	Moorestown/Oaktrail has appeared only in the PC like form so the
	following bits of staging can be binned:

	drivers/staging/spectra

so let's delete it.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:28:56 -08:00
Martyn Welch 9dc367bc4c Driver for GE PIO2 VME Card
This patch implements a driver for the GE PIO2 VME Parallel I/O Card.  This
card is a 6U VME Card, implementing 32 solid-state relay switched IO lines,
in 4 groups of 8. Each bank of IO lines is built to function as input,
output or both depending on the variant of the card.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:25:38 -08:00
Manohar Vanga 8cdc081913 staging: vme: fix comment for struct vme_dev
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:25:38 -08:00
Manohar Vanga 5b93c2a2f1 staging: vme: remove vme_add_bus() and vme_remove_bus()
The functions vme_add_bus() and vme_remove_bus() were only being used
in the vme_register_bridge() and vme_unregister_bridge() functions
respectively. This patch gets rid of them and moves their code to
vme_register_bridge() and vme_unregister_bridge().

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:25:38 -08:00
Manohar Vanga c26f611299 staging: vme: fix comment in __vme_register_driver()
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:25:38 -08:00
Martyn Welch 3fe0a87f8f Staging: VME: Update TODO file
Contents of TODO file has become more of a feature wish-list rather than issues
which should stop the VME driver being merged into the mainline kernel.

Update the TODO list with issues that need to be resolved before it can be
migrated to mainline.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:23:57 -08:00
Manohar Vanga b91a9363bb staging: vme: fix address cast warnings for 64 bit architectures
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:23:57 -08:00
Dan Carpenter 9638b67ba2 Staging: sep: potential buffer overflow in ioctl
tail_size is determined by several variables that come from the user
so we should verify that it's not too large.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:23:57 -08:00
Thomas Meyer 23226977e9 staging: rtl8192e: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation

 The semantic patch that makes this change is available
 in scripts/coccinelle/api/memdup.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:21:17 -08:00
Thomas Meyer d9317533c5 staging: rtl8192e: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation

 The semantic patch that makes this change is available
 in scripts/coccinelle/api/memdup.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:21:16 -08:00
Thomas Meyer 929fa2a42e staging: rtl8192e: Use kzalloc rather than kmalloc v2
Use kzalloc rather than kmalloc followed by memset with 0

This considers some simple cases that are common and easy to validate
Note in particular that there are no ...s in the rule, so all of the
matched code has to be contiguous

The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:21:16 -08:00
Stefan Lippers-Hollmann 61fcc0166f rtl8192e: drop alternate code paths for CONFIG_PM_RTL
It has always been enabled unconditionally by ccflags-y.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:19:24 -08:00
Stefan Lippers-Hollmann 71769d737a rtl8192e: use HAVE_NET_DEVICE_OPS unconditionally
Mainline provides NET_DEVICE_OPS, remove alternate code paths and now
obsolete defines from ccflags-y.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:19:24 -08:00
Stefan Lippers-Hollmann 44b6eb2637 rtl8192e: remove stale defines from ccflags-y
Code paths using these defines have been removed long time ago,
now remove stale references from injected ccflags-y.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:19:24 -08:00
Jesper Juhl 6f03053b68 rtl8192e: Don't copy huge struct by value (and make it const).
rtllib_is_shortslot() takes one argument - a struct that's more than a
kilobyte large. It should take a pointer instead of copying such a
huge struct - and the argument might as well be declared 'const' now
that we are at it, since it is not modified. This patch makes these
changes.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:19:23 -08:00
Julia Lawall 7c19c1e80d drivers/staging/rtl8712/rtl871x_mlme.c: eliminate a null pointer dereference
If ibss_wlan is NULL, it is not correct to memcpy into its field.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

if (E == NULL)
{
  ... when != if (E == NULL || ...) S1 else S2
      when != E = E1
*E->f
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:19:23 -08:00
Marc Dietrich 7990b0d7ec staging: nvec: add device tree support
This adds device tree support to the nvec driver. By using this method
it is no longer necessary to specify platform data through a board
file.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Cc: Julian Andres Klode <jak@jak-linux.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:17:14 -08:00
Kevin McKinney d9f26a6689 Staging: bcm: Fix semaphore locking error when downloading firmware.
This patch releases semaphore locks when
an error occurrs while attempting to
download firmware for the bcm driver.
When downloading firmware for this driver,
a process is expected to call
the following ioctl's in this order:
(1)IOCTL_BCM_BUFFER_DOWNLOAD_START,
(2)IOCTL_BCM_BUFFER_DOWNLOAD, and (3)
IOCTL_BCM_BUFFER_DOWNLOAD_STOP.
Semaphore, “Adapter->fw_download_sema” is
expected to be acquired in the first ioctl,
IOCTL_BCM_BUFFER_DOWNLOAD_START, and it should
block until IOCTL_BCM_BUFFER_DOWNLOAD_STOP
is called.  In this case, if an error
occurred before STOP finished, the semaphore
"Adapter->fw_download_sema" was not being released.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:14:48 -08:00
Kevin McKinney abe33fc093 Staging: bcm: Fix semaphore locking bug in, IOCTL_BCM_BUFFER_DOWNLOAD
In this ioctl, we are testing to see if the lock is held.
If it is not held, that means this ioctl used incorrectly.
Therefore, we do not want to take the lock ourselves here.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:14:48 -08:00
Kevin McKinney 77121d52a4 Staging: bcm: Remove unnecessary "do while" statement in, IOCTL_BCM_BUFFER_DOWNLOAD
This patch removes a superfluous "do while"
statement in IOCTL_BCM_BUFFER_DOWNLOAD.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:14:48 -08:00
Kevin McKinney 51935d2259 Staging: bcm: Clean up code in ioctl: IOCTL_BCM_EEPROM_REGISTER_READ
This patch verifies two conditions before executing
a kmalloc call. First, it checks to see that
IoBuffer.OutputLength is not greater than an
unsigned short. If so, an invalid value may be
returned. The second change is a check to make
sure IoBuffer.OutputLength is not equal to
zero. Which simply keeps this code inline with
the other ioctl, IOCTL_BCM_REGISTER_READ_PRIVATE.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:13:33 -08:00
Kevin McKinney 41c7b7c0fa Staging: bcm: Fix information leak in ioctl: IOCTL_BCM_REGISTER_READ_PRIVATE, IOCTL_BCM_EEPROM_REGISTER_READ
This patch fixes an information leak in ioctl
IOCTL_BCM_REGISTER_READ_PRIVATE and
IOCTL_BCM_EEPROM_REGISTER_READ when determining
the number of bytes to copy to user space.  Function,
usb_control_msg, returns the correct number of
bytes from the hardware.  Instead of using
this value, we were using a value derived from
user space. In this case, this value could be more
than the hardware allocated.  Therefore, this
patch copies the proper number of bytes from
the hardware, and uses this value as the maximum
number of bytes for user space.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:11:58 -08:00
Diego F. Marfil 57bfa9d417 Staging: bcm: hostmibs: Added temporary variable to shorten lines
Signed-off-by: Diego F. Marfil <diegomarfil@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:11:12 -08:00
Diego F. Marfil 94abda9837 Staging: bcm: hostmibs: White spaces and indentation fixes.
Signed-off-by: Diego F. Marfil <diegomarfil@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:11:11 -08:00
Diego F. Marfil ed8e9bb7e0 Staging: bcm: hostmibs: C99 comments replaced
Signed-off-by: Diego F. Marfil <diegomarfil@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:11:11 -08:00
Thomas Meyer 27b7923035 staging: hv: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:03:56 -08:00
K. Y. Srinivasan b401731985 Staging: hv: storvsc: Support hot-removing of scsi devices
Support hot-removing of scsi devices.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:08 -08:00
K. Y. Srinivasan 126757998a Staging: hv: storvsc: Support hot add of scsi disks
Support hot add of scsi disks.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:08 -08:00
K. Y. Srinivasan 2b9525f511 Staging: hv: storvsc: Upgrade the vmstor protocol version
In preparation for supporting hot add/remove of scsi devices,
upgrade the vmstor protocol version.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:08 -08:00
K. Y. Srinivasan a404c1ff55 Staging: hv: storvsc: Get rid of an unnecessary forward declaration
Get rid of an unnecessary forward declaration.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:08 -08:00
K. Y. Srinivasan fafb0efc30 Staging: hv: storvsc: use the macro KBUILD_MODNAME
Use the macro KBUILD_MODNAME.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:07 -08:00
K. Y. Srinivasan bab445e12b Staging: hv: storvsc: Use the unlocked version queuecommand
Use the unlocked version queuecommand.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:07 -08:00
K. Y. Srinivasan 7f33f30a67 Staging: hv: storvsc: Use the accessor function shost_priv()
Use the accessor function shost_priv().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:07 -08:00
K. Y. Srinivasan a00e8224c1 Staging: hv: storvsc: Fix error handling storvsc_host_reset()
Fix error handling storvsc_host_reset(). I would like to thank
Long Li <longli@microsoft.com> for reporting this.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Long Li <longli@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:07 -08:00
K. Y. Srinivasan 59e00e744d Staging: hv: storvsc: Fixup the error when processing SET_WINDOW command
Fixup the error when processing SET_WINDOW command.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:07 -08:00
K. Y. Srinivasan 225ce6eab7 Staging: hv: storvsc: Cleanup error handling in the probe function
Cleanup error handling in the probe function.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:07 -08:00
K. Y. Srinivasan 4e03e697c5 Staging: hv: storvsc: Use mempools to allocate struct storvsc_cmd_request
We intend to use the storage driver to manage the root device.
To avoid deadlocks, use mempools to allocate struct storvsc_cmd_request.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:02:07 -08:00
K. Y. Srinivasan 1c7dac3269 Staging: hv: mousevsc: Use the KBUILD_MODNAME macro
Use the KBUILD_MODNAME macro.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:00:01 -08:00
K. Y. Srinivasan 226383751f Staging: hv: mousevsc: Add a check to prevent memory corruption
Add a check to prevent memory corruption.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:00:01 -08:00
K. Y. Srinivasan dba8e1ad95 Staging: hv: mousevsc: Address some style issues
Deal with some style related issues. Also get rid of an unused macro.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:00:01 -08:00
K. Y. Srinivasan f72a1cc74f Staging: hv: mousevsc: Get rid of unnecessary include files
Get rid of unnecessary include files.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:57:46 -08:00
K. Y. Srinivasan f50617fabd Staging: hv: mousevsc: Add a new line to a debug string
Add a new line to a debug string.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:57:46 -08:00
K. Y. Srinivasan 3b5632efd9 Staging: hv: mousevsc: Cleanup mousevsc_on_channel_callback()
Cleanup mousevsc_on_channel_callback(). This is based on the code provided
by Joe Perches <joe@perches.com>.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:57:45 -08:00
K. Y. Srinivasan 32325302aa Staging: hv: mousevsc: Inline the code for reportdesc_callback()
Inline the code for reportdesc_callback() as this function is called from
mousevsc_probe(). As part of this, cleanup the code in reportdesc_callback().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:57:45 -08:00
K. Y. Srinivasan 5cf06b0de8 Staging: hv: mousevsc: Inline the code for mousevsc_on_device_add()
Inline the code for mousevsc_on_device_add() as this only used from
the function mousevsc_probe().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:57:45 -08:00
K. Y. Srinivasan a1914f5416 Staging: hv: mousevsc: Make boolean states boolean
Make some state that is boolean in nature, a boolean variable.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:57:44 -08:00
Dan Carpenter c1a752883d Staging: iio: fix endian conversion in ad7298_scan_direct()
"tmp" is used to store the output from cpu_to_be16() so it should be
a __be16 bit type.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:55:38 -08:00
Sasha Levin 5ae8f44090 iio: Don't OOPS if dummy evgen failed init
If the dummy evgen failed init, the irq allocation functions which assume
init succeeded may still be called - causing an OOPS due to wrong assumption.

Here's the oops:

[    3.914332] BUG: unable to handle kernel NULL pointer dereference at 0000000000000148
[    3.915310] IP: [<ffffffff810b3008>] __lock_acquire+0xac/0xe50
[    3.915310] PGD 0
[    3.915310] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
[    3.915310] CPU 1
[    3.915310] Pid: 1, comm: swapper Not tainted 3.2.0-rc2-sasha-00279-gd7bfb12-dirty #20
[    3.915310] RIP: 0010:[<ffffffff810b3008>]  [<ffffffff810b3008>] __lock_acquire+0xac/0xe50
[    3.915310] RSP: 0018:ffff880012499bc0  EFLAGS: 00010046
[    3.915310] RAX: 0000000000000086 RBX: ffff880012490000 RCX: 0000000000000000
[    3.915310] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000148
[    3.915310] RBP: ffff880012499c90 R08: 0000000000000002 R09: 0000000000000000
[    3.915310] R10: 0000000000000148 R11: 0000000000000000 R12: 0000000000000148
[    3.915310] R13: 0000000000000002 R14: 0000000000000000 R15: 0000000000000000
[    3.915310] FS:  0000000000000000(0000) GS:ffff880013c00000(0000) knlGS:0000000000000000
[    3.915310] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[    3.915310] CR2: 0000000000000148 CR3: 0000000002605000 CR4: 00000000000406e0
[    3.915310] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    3.915310] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[    3.915310] Process swapper (pid: 1, threadinfo ffff880012498000, task ffff880012490000)
[    3.915310] Stack:
[    3.915310]  ffff880012490000 ffffffff81e6fd38 ffffffff00000000 0000000000000000
[    3.915310]  0000000000000148 0000000012499c08 ffffffff00000000 000000000000002e
[    3.915310]  0000000000000001 ffff880012499ce0 ffffffff8161620e 0000000000000000
[    3.915310] Call Trace:
[    3.915310]  [<ffffffff81e6fd38>] ? retint_restore_args+0x13/0x13
[    3.915310]  [<ffffffff8161620e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[    3.915310]  [<ffffffff81e6fd38>] ? retint_restore_args+0x13/0x13
[    3.915310]  [<ffffffff81af8883>] ? iio_dummy_evgen_get_irq+0x33/0x8a
[    3.915310]  [<ffffffff810b4255>] lock_acquire+0x8a/0xa7
[    3.915310]  [<ffffffff81af8883>] ? iio_dummy_evgen_get_irq+0x33/0x8a
[    3.915310]  [<ffffffff81e6db81>] __mutex_lock_common+0x63/0x491
[    3.915310]  [<ffffffff81af8883>] ? iio_dummy_evgen_get_irq+0x33/0x8a
[    3.915310]  [<ffffffff810b474d>] ? debug_check_no_locks_freed+0x135/0x14a
[    3.915310]  [<ffffffff810b2c3a>] ? lock_is_held+0x92/0x9d
[    3.915310]  [<ffffffff81e6dfe5>] mutex_lock_nested+0x36/0x3b
[    3.915310]  [<ffffffff81af8883>] iio_dummy_evgen_get_irq+0x33/0x8a
[    3.915310]  [<ffffffff81af8594>] iio_simple_dummy_events_register+0x1b/0x69
[    3.915310]  [<ffffffff82ad4a91>] iio_dummy_init+0x105/0x18d
[    3.915310]  [<ffffffff82ad498c>] ? iio_init+0x7d/0x7d
[    3.915310]  [<ffffffff82a8dc02>] do_one_initcall+0x7a/0x135
[    3.915310]  [<ffffffff82a8dda7>] kernel_init+0xea/0x16f
[    3.915310]  [<ffffffff81e727c4>] kernel_thread_helper+0x4/0x10
[    3.915310]  [<ffffffff81e6fd38>] ? retint_restore_args+0x13/0x13
[    3.915310]  [<ffffffff82a8dcbd>] ? do_one_initcall+0x135/0x135
[    3.915310]  [<ffffffff81e727c0>] ? gs_change+0x13/0x13
[    3.915310] Code: 95 50 ff ff ff 74 24 e8 1f 3f 56 00 85 c0 0f 84 4e 0d 00 00 be cf 0b 00 00 83 3d 63 7c 58 02 00 0f 85 3c 0d 00 00 e9 c1 0c 00 00
[    3.915310]  81 3a a0 17 ca 82 b8 01 00 00 00 44 0f 44 e8 83 fe 01 77 0c
[    3.915310] RIP  [<ffffffff810b3008>] __lock_acquire+0xac/0xe50
[    3.915310]  RSP <ffff880012499bc0>
[    3.915310] CR2: 0000000000000148

Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:52:44 -08:00
Lars-Peter Clausen 55e4390cb0 staging:iio: Add missing MODULE_DEVICE_TABLE and MODULE_ALIAS
Quite a few iio drivers provide no MODULE_DEVICE_TABLE or MODULE_ALIAS or only
provide a MODULE_ALIAS while they have support for multiple device ids. This
prevents auto module loading from working correctly.

This patch fixes it by adding the missing MODULE_DEVICE_TABLEs and
MODULE_ALIAS'.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:48:04 -08:00
Lars-Peter Clausen 275de9f7a8 staging:iio:dac:ad5624r: Convert to channel spec
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:46:58 -08:00
Lars-Peter Clausen a7b152881c staging:iio:dac:ad5504: Convert to channel spec
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:46:58 -08:00
Lars-Peter Clausen 33ad6b21f6 staging:iio:dac:ad5446: Convert to channel spec
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:46:57 -08:00
Paul Bolle 73aaf63c5e staging: iio: drop "select IIO_SIMPLE_DUMMY_EVGEN"
Commit e6477000fc ("staging:iio:dummy Add event support + fake event
generator") added "select IIO_SIMPLE_DUMMY_EVGEN if [...]". But there
is no Kconfig symbol named IIO_SIMPLE_DUMMY_EVGEN. The select statement
for that symbol is a nop. Drop it.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Jonathan Cameron <jic23@camd.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:43:38 -08:00
Lars-Peter Clausen 465825963c staging:iio:dac:ad5446: Add support for the AD5662
The AD5662 is compatible to the AD5660, but uses an external reference instead
of an internal.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:43:38 -08:00
Lars-Peter Clausen 5691b23489 staging:iio:dac: Add AD5421 driver
This patch adds support for the Analog Devices AD5421 Loop-Powered, 4mA to 20mA
DAC.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:39:58 -08:00
Lars-Peter Clausen 19c2aedc54 staging:iio: IIO_EVENT_CODE: Clamp channel numbers
Make sure we only use the allotted space for channel numbers in the event mask
and do not let them override other fields.

Since negative values are valid channel number, cast the channel number to
signed when extracting it from an event mask.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:39:58 -08:00
Lars-Peter Clausen 43c0364551 staging:iio: Make write_event_value callback optional
Some devices have fixed thresholds which can not be modified so make the
write_event_value callback optional, so the drivers for these devices do not
have to implement a boilerplate no-op callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:39:58 -08:00
Dan Carpenter 685e010748 Staging: iio/dac/ad5360.c: signedness bug in ad5360_read_raw()
ad5360_get_channel_vref() returns an int and scale_uv should be the
same.  Making it unsigned here breaks the error handling.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:38:32 -08:00
Dan Carpenter 23a3b8cc9c Staging: iio/dac/ad5064.c: signedness bug in ad5064_read_raw()
regulator_get_voltage() returns an int so "scale_uv" should be an
int.  Making it unsigned here breaks the error handling.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:38:32 -08:00
Jonathan Cameron c8a9f8056f staging:iio:treewide only use shared to decide on interfaces
Internally the fact that say scale is shared across channels is
actually of remarkably little interest.  Hence lets not store it.
Numerous devices have weird combinations of channels sharing
scale anyway so it is not as though this was really telling
us much. Note however that we do still use the shared sysfs
attrs thus massively reducing the number of attrs in complex
drivers.

Side effect is that certain drivers that were abusing this
(mostly my work) needed to do a few more checks on what the
channel they are being queried on actually is.

This is also helpful for in kernel interfaces where we
just want to query the scale and don't care whether it
is shared with other channels or not.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:35:04 -08:00
Lars-Peter Clausen 924f8a21dd staging:iio: Do not use bitmasks for channel info addresses
Currently the iio framework uses bitmasks for the address field of channel info
attributes. This is for historical reasons and no longer required since it will
only ever query a single info attribute at once. This patch changes the code to
use the non-shifted iio_chan_info_enum values for the info attribute address.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:35:04 -08:00
Lars-Peter Clausen 3014cd97e5 staging:iio: Add documentation for IIO_EVENT_CODE
Document the different parameters of the IIO_EVENT_CODE macro and friends.

While we are at it standardise the name of channel type parameter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:35:04 -08:00
Lars-Peter Clausen 65d5ff8d51 staging:iio: Use userspace types for iio_event_data
Since we want to export struct iio_event_data to userspace use the userspace
integer types. Also add a include to linux/types.h.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:35:04 -08:00
Jonathan Cameron af5046af1c staging:iio: header reorganization
Issue brought up by Lars-Peter Clausen. This is a varient of what
he suggested.

io/iio.h for driver stuff (has to include types.h)
	Sub files for the bits drivers may or may not use
	iio/sysfs.h
	iio/buffer.h (contents of current buffer_generic.h)
	(obviously anything offering events will need events.h as well)
iio/types.h for the enums that matter to both
	iio_chan_type, iio_modifier
iio/events.h for the event code stuff
	IIO_EVENT_CODE and friends.  + everything in chrdev.h  So this
	is the stuff that userspace cares about.
	Also include iio_event_type, iio_event_direction

Thus iio drivers include iio.h + as required
events.h
sysfs.h
buffer.h

in kernel users (once that interface is merged) will need inkern.h
which will pull in types.h

Userspace will need just events.h (which pulls in types.h) to get
everything they need to know about.  Buffer userspace access doesn't
currently need any core defines. All information about the data
format is passed through sysfs.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:35:04 -08:00
Greg Kroah-Hartman f791cec850 Subject: fix build breakage in drivers/staging/iio/industrialio-core.c
This was introduced in commit b464133679
(iio: fix a leak due to improper use of anon_inode_getfd())

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:31:16 -08:00
Jonathan Cameron 96e00f110f staging:iio: core. Allow for event chrdev obtaining ioctl if no buffer present.
Logic bug meant the chrdev would fail to open if there was no buffer support
in a driver or in the core. This meant the ioctl to get the event chrdev
would fail and hence events were not available.

V2: change error to -EINVAL to mark as unsuitable for reading rather than
not there.  Both are true depending on how you look at it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:30:31 -08:00
Lars-Peter Clausen bc9f35db8f staging:iio:iio_utils.h: Add missing include
iio_utils.h uses opendir and friends which need dirent.h

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:30:31 -08:00
Lars-Peter Clausen dc8f52643d staging:iio:events: Make sure userspace buffer is large enough
Make sure that the userspace buffer is large enough to hold a iio_event_data
struct before writing to it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:30:31 -08:00
Jonathan Cameron 0403e0d643 staging:iio:core shared attrs do not work with modifier.
The logic building the name had a small bug where
it did not verify if it was generic before applying the
modifier.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:30:30 -08:00
Jonathan Cameron 5dd72ecb01 staging:iio: trigger fixes for repeat request of same trigger and allocation failure
Both of these are decidedly silly bugs show up whilst testing
completely different code paths.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:30:30 -08:00
Jonathan Cameron 4c3d15358a staging:iio:kfifo remove entirely pointless code.
I really don't want to think about how this bit got
in there.  It allocates some storage - copies something
into it then frees it without making use of it.
Oops.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:30:30 -08:00
Jonathan Cameron e69616b1e6 staging:iio:industrialio-trigger.c Trivial code style brackets fix
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:30:30 -08:00
Jonathan Cameron 67be8e32c9 staging:iio:triggers Remove unecessary existence checks and return val
Postenable and predisable are called via buffer->ops so  don't
need to check if buffer exists.

The return value of iio_device_register_trigger_consumer is
always zero and it isn't checked anyway so get rid of it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:30:30 -08:00
Maxin B. John 22dc09cafd staging:iio:light:tsl2563 missing setting of id in get id function.
Signed-off-by: Maxin B. John <maxin.john@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:30:30 -08:00
Jonathan Cameron a7e3bd669e staging:iio:light:tsl2563 both intensity channels have same chan_spec.
Bug has been fixed for some time in the outofstaging tree, but
didn't propogate back to here.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:30:30 -08:00
Michael Hennerich 703a9ce45a iio: adc: ad7280a: Fix memory leak
Free channels in case read fails with error.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:28:56 -08:00
Michael Hennerich e15fbc91a4 iio: introduce type casts to avoid __ucmpdi2 calls
This patch type casts the switch control variable to 32 bits in order to
prevent a call __ucmpdi2 generated by some versions of gcc.

This fixes an undefined reference to `__ucmpdi2' when compiled for arch/blackfin

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:28:56 -08:00
Greg Kroah-Hartman 53b99be764 Staging: rtl8192u: remove api.c file
It wasn't being used, and had a hacked-up export symbol table which
wasn't very nice either.

Reported-by: James Morris <jmorris@namei.org>
Cc: Herbert Xu <herbert@gondor.hengli.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:25:54 -08:00
Geert Uytterhoeven 0775c98acf m68k/serial: Remove obsolete IRQ_FLG_* users
The m68k core irq code stopped honoring these flags during the irq
restructuring in 2006.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:22:27 -08:00
Mark Einon 54dbf04f91 staging: et131x: Remove section comments
Following the move to put the driver into one file, comments were added to identify which source file each set of functions originated from.
These no longer made sense after functions were moved around to remove some forward declarations, so remove them.

A function comment was previously not moved along with its function, now they are reunited.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:21:24 -08:00
Francois Romieu d14e3d05f3 et131x: uncloak PCIe capabilities.
FIXME: it should be possible to get rid of ET1310_PCI_L0L1LATENCY as well.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:21:24 -08:00
Francois Romieu 5f3eb881a9 et131x: kiss netdev.{base_addr, irq} goodbye.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:21:06 -08:00
Francois Romieu c3abb6871e et131x: remove extraneous pci_save_state.
pci_{save, restore}_state are balanced in .suspend and .resume.
They are not used anywhere else in the driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:21:06 -08:00
Francois Romieu fa9f0a657e et131x: fix error paths in et131x_pci_setup.
Wrong status code and unbalanced phy_connect.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:20:36 -08:00
Francois Romieu 834d0ee317 et131x: uintxy_t removal.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:19:31 -08:00
Francois Romieu eb7a6ca618 et131x: add static qualifiers.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:19:31 -08:00
Thomas Meyer cff863871e Staging: line6: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation

 The semantic patch that makes this change is available
 in scripts/coccinelle/api/memdup.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:14:57 -08:00
Stefan Hajnoczi 140e28b83c staging: line6: alloc/free buffers in hw_params/hw_free
It is unsafe to free buffers in line6_pcm_stop(), which is not allowed
to sleep, since urbs cannot be killed completely there and only
unlinked.  This means I/O may still be in progress and the URB
completion function still gets invoked.  This may result in memory
corruption when buffer_in is freed but I/O is still pending.

Additionally, line6_pcm_start() is not supposed to sleep so it should
not use kmalloc(GFP_KERNEL).

These issues can be resolved by performing buffer allocation/freeing in
the .hw_params/.hw_free callbacks instead.  The ALSA documentation also
recommends doing buffer allocation/freeing in these callbacks.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:14:12 -08:00
Stefan Hajnoczi 3b08db37cb staging: line6: use smallest iso ep packet size
The POD HD300 isochronous endpoints have different max packet sizes for
read and write.  Using the read endpoint max packet size may be too
large for the write endpoint.  Instead we should use the minimum of both
endpoints to be sure the size is acceptable.

In theory we could decouple read and write packet sizes but the driver
currently uses a single size which I chose not to mess with since other
features like software monitoring may depend on a single packet size for
both endpoints.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:14:12 -08:00
Stefan Hajnoczi 1dc403ffec staging: line6: add missing MIDI postprocessing case for POD HD300
The driver leaves MIDI processing up to userspace for the POD HD300
device.  Add a missing case statement to skip MIDI postprocessing in the
driver.  This change has no effect other than silencing a printk:

  line6usb driver bug: missing case in linux/drivers/staging/line6/midi.c:179

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:14:11 -08:00
Stefan Hajnoczi 16dc104011 staging: line6: add Pod HD300 support
The Pod HD device family uses new MIDI SysEx messages and therefore
cannot reuse the existing Pod code.  Instead of hardcoding Pod HD MIDI
messages into the driver, leave MIDI up to userspace.  This driver
simply presents MIDI and pcm ALSA devices.

This device is similar to the Pod except that it has 48 kHz audio and
does not respond to Pod SysEx messages.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:14:11 -08:00
Jesper Juhl 982d6ab501 line6: fix memory leaks in line6_init_midi()
If the first call to line6_midibuf_init() fails we'll leak a little
bit of memory. If the second call fails we'll leak a bit more. This
happens when we return from the function and the local variable
'line6midi' goes out of scope.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:14:11 -08:00
Tomas Winkler 6f37aca827 staging/mei: fix check for allocating host client id
MEI_CLIENTS_MAX is 255 and host_client_id is u8 therefore
for check to work we need to first assign the return value
of find_first_zero_bit to unsigned long variable

Fix warning

drivers/staging/mei/main.c: In function mei_open
drivers/staging/mei/main.c:260:2: warning: comparison is always false due to limited range of data type

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:05:14 -08:00
Oren Weil 5b881e3c08 staging: mei: expose misc interface instead of char device
Misc device provides everything MEI needs for registration,
it doesn't required separate driver class.

Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:05:13 -08:00
Tomas Winkler 575c1e43c8 staging:mei: wd_ops and wd_info should be static
wd_ops and wd_info structures are local to wd.c so mark them static

Cc: Oren Weil <oren.jer.weil@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:05:13 -08:00
Alan Cox 55f9102b75 gma500: mark staging broken
It now clashes with upstream DRM which we don't want to block.

We don't want to delete this code just yet as we want to keep it for
comparison and reference when debugging, but soon it will be a removal
candidate as well

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: linux-next@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:05:13 -08:00
Andy Whitcroft aaa0b4f007 iio: iio_event_getfd -- fix ev_int build failure
Fix build failure in staging iio driver:

.../drivers/staging/iio/industrialio-core.c: In function 'iio_event_getfd':
.../drivers/staging/iio/industrialio-core.c:262:32: error:
			'ev_int' undeclared (first use in this function)

Also convert the rest of the function to use the new variable.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-26 13:23:49 -08:00
Dan Carpenter 87d466e503 [media] staging/media: lirc_imon: add a __user annotation
This silences the following Sparse warnings:
lirc_imon.c:404:32: warning: incorrect type in argument 1 (different address spaces)
lirc_imon.c:404:32:    expected void const [noderef] <asn:1>*<noident>
lirc_imon.c:404:32:    got char const *buf
lirc_imon.c:117:28: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
lirc_imon.c:117:28:    expected long ( *write )( ... )
lirc_imon.c:117:28:    got long ( static [toplevel] *<noident> )( ... )

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-26 08:48:03 -02:00
Jesse Barnes 15b273bb26 drm/staging/gma500: fix linux-next build
Here's a patch to move things over to the new addfb2 interfaces at
least.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-25 10:13:42 +00:00
Pete 7e5219d18e [media] go7007: Fix 2250 urb type
commit a846d8fce9e8be30046be3c512982bd0345e7015

The 2250 board uses bulk endpoint for interrupt handling,
and should use a bulk urb instead of an int urb.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 21:09:25 -02:00
Gianluca Gennari dd7aaa4d9d [media] staging: as102: Add support for Sky Italia Digital Key based on the same chip
Add support for the Sky Italia Digital Key, an USB dongle offered
by Sky Italia to its customers for use with their satellite set-top-boxes.
This is the "green led" model based on the Abilis as102 chip, while the
so called "blue led" model is based on the Avermedia A867 design.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:34:48 -02:00
Tomas Winkler a6ff0a06d8 [media] easycap: fix warnings: variable set but not used
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:18:19 -02:00
Tomas Winkler 0b217d2125 [media] easycap: drop usb_class_driver
Drop usb_class_driver and collaterals as it is not used

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:17:53 -02:00
Tomas Winkler 96bec7dd72 [media] easycap: add easycap prefix to global functions names
Add easycap prefix to global function to reduce
possibility of name collision.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:17:32 -02:00
Tomas Winkler a5b6ee06b2 [media] easycap: remove unused members of struct easycap
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:17:02 -02:00
Tomas Winkler 4329f3c6a5 [media] easycap: easycap_usb_driver should be static to easycap_main.c
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:16:49 -02:00
Tomas Winkler 8b1fad2f04 [media] easycap: use usb_kill_urb wrapper functions
1. kill_video_usb can be used in all places where video urbs are killed
and reduce code repetition

2. remove unnecessary check for easycap == NULL in the function
as it is always checked by the calling function

3. rename the function to easycap_video_kill_urb to reduce
possibility of name conflict

4. implement also easycap_audio_kill_urb

5. simplify freeing urbs

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:16:22 -02:00
Tomas Winkler 7dfdae8e32 [media] easycap: drop initializations to 0 in the probe functions
peasycap was allocated using kzalloc so drop all
to zero initializations

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:14:15 -02:00
Tomas Winkler 101dca425d [media] easycap: streamline the code
change statements of types
	if (err)
		return err
	else
		do something

and
	if (ok)
		do something
	else
		return err

into

	if (err)
		return err

	do something

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:12:53 -02:00
Tomas Winkler 7dbb392025 [media] easycap: compress initialization tables
1. saa and stk initialization tables are less then
256 entries
2. stk table can fit into u16 and saa into u8

size before
 text	   data	    bss	    dec	    hex	filename
 105687	   1072	1134800	1241559	 12f1d7	easycap.ko

size after

 text	   data	    bss	    dec	    hex	filename
 97919	   1072	1134800	1233791	 12d37f	easycap.ko

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:10:36 -02:00
Tomas Winkler 47cefc21ef [media] easycap: remove linux/version.h include from easycap_ioctl.c
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:09:50 -02:00
Tomas Winkler 98680557f3 [media] easycap: cleanup function usage
1. Remove declarations of none global functions from easycap.h
and make them static in the c-files.
2. Reorder static functions to reduce number of forward declarations.
3. Remove unused functions.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:09:08 -02:00
Ben Hutchings affc9a0d59 [media] staging: lirc_serial: Do not assume error codes returned by request_irq()
lirc_serial_probe() must fail if request_irq() returns an error, even if
it isn't EBUSY or EINVAL,

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:18:21 -02:00
Ben Hutchings 9b98d60679 [media] staging: lirc_serial: Fix bogus error codes
Device not found?  ENODEV, not EINVAL.
Write to read-only device?  EPERM, not EBADF.
Invalid argument?  EINVAL, not ENOSYS.
Unsupported ioctl?  ENOIOCTLCMD, not ENOSYS.
Another function returned an error code?  Use that, don't replace it.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:18:05 -02:00
Ben Hutchings 1ff1d88e86 [media] staging: lirc_serial: Fix deadlock on resume failure
A resume function cannot remove the device it is resuming!

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:17:50 -02:00
Ben Hutchings c8e57e1b76 [media] staging: lirc_serial: Free resources on failure paths of lirc_serial_probe()
Failure to allocate the I/O region leaves the IRQ allocated.
A later failure leaves them both allocated.

Reported-by: Torsten Crass <torsten.crass@eBiology.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:17:30 -02:00
Ben Hutchings 9105b8b200 [media] staging: lirc_serial: Fix init/exit order
Currently the module init function registers a platform_device and
only then allocates its IRQ and I/O region.  This allows allocation to
race with the device's suspend() function.  Instead, allocate
resources in the platform driver's probe() function and free them in
the remove() function.

The module exit function removes the platform device before the
character device that provides access to it.  Change it to reverse the
order of initialisation.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:16:40 -02:00
Sylwester Nawrocki 1ec9a35e1c [media] staging: as102: Add missing function argument
Add missing dev argument in dev_err() call to correct an error
introduced in commit 880102898f

Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 14:46:05 -02:00
Mauro Carvalho Chehab 12cbfd0a3c Merge tag 'v3.2-rc2' into staging/for_v3.3
* tag 'v3.2-rc2': (3068 commits)
  Linux 3.2-rc2
  hfs: add sanity check for file name length
  fsl-rio: fix compile error
  blackfin: Fixup export.h includes
  Blackfin: add serial TX IRQ in individual platform resource
  virtio-pci: fix use after free
  ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression)
  drm/radeon/kms/combios: fix dynamic allocation of PM clock modes
  [CPUFREQ] db8500: fix build error due to undeclared i variable
  bma023: Add SFI translation for this device
  vrtc: change its year offset from 1960 to 1972
  ce4100: fix a build error
  arm/imx: fix imx6q mmc error when mounting rootfs
  arm/imx: fix AUTO_ZRELADDR selection
  arm/imx: fix the references to ARCH_MX3
  ARM: mx51/53: set pwm clock parent to ipg_perclk
  btrfs: rename the option to nospace_cache
  drm/radeon/kms/pm: switch to dynamically allocating clock mode array
  drm/radeon/kms: optimize r600_pm_profile_init
  drm/radeon/kms/pm: add a proper pm profile init function for fusion
  ...

Conflicts:
	drivers/media/radio/Kconfig
2011-11-23 19:42:09 -02:00
Rafael J. Wysocki 986b11c3ee Merge branch 'pm-freezer' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into pm-freezer
* 'pm-freezer' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc: (24 commits)
  freezer: fix wait_event_freezable/__thaw_task races
  freezer: kill unused set_freezable_with_signal()
  dmatest: don't use set_freezable_with_signal()
  usb_storage: don't use set_freezable_with_signal()
  freezer: remove unused @sig_only from freeze_task()
  freezer: use lock_task_sighand() in fake_signal_wake_up()
  freezer: restructure __refrigerator()
  freezer: fix set_freezable[_with_signal]() race
  freezer: remove should_send_signal() and update frozen()
  freezer: remove now unused TIF_FREEZE
  freezer: make freezing() test freeze conditions in effect instead of TIF_FREEZE
  cgroup_freezer: prepare for removal of TIF_FREEZE
  freezer: clean up freeze_processes() failure path
  freezer: kill PF_FREEZING
  freezer: test freezable conditions while holding freezer_lock
  freezer: make freezing indicate freeze condition in effect
  freezer: use dedicated lock instead of task_lock() + memory barrier
  freezer: don't distinguish nosig tasks on thaw
  freezer: remove racy clear_freeze_flag() and set PF_NOFREEZE on dead tasks
  freezer: rename thaw_process() to __thaw_task() and simplify the implementation
  ...
2011-11-23 21:09:02 +01:00
Linus Torvalds 2db1125d51 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  mount_subtree() pointless use-after-free
  iio: fix a leak due to improper use of anon_inode_getfd()
  microblaze: bury asm/namei.h
2011-11-22 13:19:21 -08:00
Linus Torvalds bbbc4791cd Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: fix more ET131X build errors
  staging: et131x depends on NET
  staging: slicoss depends on NET
  linux-next: et131x: Fix build error when CONFIG_PM_SLEEP not enabled
2011-11-21 20:37:34 -08:00
Al Viro b464133679 iio: fix a leak due to improper use of anon_inode_getfd()
it can fail and in that case ->release() will *not* be called...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-11-21 17:25:37 -05:00
Tejun Heo 3a7cbd50f7 freezer: don't unnecessarily set PF_NOFREEZE explicitly
Some drivers set PF_NOFREEZE in their kthread functions which is
completely unnecessary and racy - some part of freezer code doesn't
consider cases where PF_NOFREEZE is set asynchronous to freezer
operations.

In general, there's no reason to allow setting PF_NOFREEZE explicitly.
Remove them and change the documentation to note that setting
PF_NOFREEZE directly isn't allowed.

-v2: Dropped change to twl4030-irq.c as it no longer uses PF_NOFREEZE.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: "Gustavo F. Padovan" <padovan@profusion.mobi>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: wwang <wei_wang@realsil.com.cn>
2011-11-21 12:32:22 -08:00
Randy Dunlap c9fb041ff1 staging: fix more ET131X build errors
ET131X is a network device, so it should depend on
NETDEVICES.  (This part won't be needed when the driver
moves to drivers/net/.)  It also uses PHYLIB interfaces,
so it should select PHYLIB.  Fixes these build errors:

ERROR: "phy_connect" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_find_first" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "mdiobus_register" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "mdiobus_alloc" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_stop" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_start" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "mdiobus_free" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "mdiobus_unregister" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_print_status" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_ethtool_gset" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_ethtool_sset" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_mii_ioctl" [drivers/staging/et131x/et131x.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: : Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 15:00:54 -08:00
Randy Dunlap 0337510f7c staging: et131x depends on NET
ET131X uses netdev interfaces so it should depend on NET.

Fixes these build errors:
ERROR: "ethtool_op_get_link" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "eth_validate_addr" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "register_netdev" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_connect" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_find_first" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "mdiobus_register" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "mdiobus_alloc" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "alloc_etherdev_mqs" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "netif_device_detach" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_stop" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "netif_device_attach" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_start" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "free_netdev" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "mdiobus_free" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "mdiobus_unregister" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "unregister_netdev" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "__netif_schedule" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_print_status" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "dev_kfree_skb_any" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "dev_alloc_skb" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "netif_rx" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "eth_type_trans" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "skb_put" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_ethtool_gset" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_ethtool_sset" [drivers/staging/et131x/et131x.ko] undefined!
ERROR: "phy_mii_ioctl" [drivers/staging/et131x/et131x.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 15:00:49 -08:00
Randy Dunlap 07de7a5ecb staging: slicoss depends on NET
The slicoss driver uses network interfaces so it should depend
on NET.  Fixes the following build errors:

ERROR: "eth_change_mtu" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "eth_validate_addr" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "register_netdev" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "alloc_etherdev_mqs" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "__netif_schedule" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "netif_rx" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "eth_type_trans" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "skb_put" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "skb_pull" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "__alloc_skb" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "free_netdev" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "unregister_netdev" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "consume_skb" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "dev_kfree_skb_irq" [drivers/staging/slicoss/slicoss.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Lior Dotan <liodot@gmail.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 15:00:48 -08:00
Mark Einon 2e9ff8d917 linux-next: et131x: Fix build error when CONFIG_PM_SLEEP not enabled
Randy Dunlap reports that the ex131x driver doesn't build when CONFIG_PM_SLEEP is not enabled.
This bug was introduced when moving code around to remove some forward declarations earlier, the #endif part of #ifdef CONFIG_PM_SLEEP was not moved at the same time. Now fixed by moving it to its proper place.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 14:52:09 -08:00
Greg Kroah-Hartman bac2c126e4 USB: convert drivers/staging/* to use module_usb_driver()
This converts the drivers in drivers/staging/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: "David Täht" <d@teklibre.com>
Cc: Marek Belisko <marek.belisko@gmail.com>
Cc: Al Cho <acho@novell.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Huajun Li <huajun.li.lee@gmail.com>
Cc: Zac Storer <zac.3.14159@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: edwin_rong <edwin_rong@realsil.com.cn>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Julia Lawall <julia@diku.dk>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Joe Perches <joe@perches.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 09:42:11 -08:00
Lars-Peter Clausen ae6ae6fec3 staging:iio: Use module_spi_driver to register SPI driver
Use the newly introduced module_spi_driver macro for registering SPI drivers.
This allows us to remove a few lines of boilerplate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-17 12:15:40 -08:00
Lars-Peter Clausen 6e5af184f8 staging:iio: Use module_i2c_driver to register I2C drivers
Use the newly introduced module_i2c_driver macro for registering I2C drivers.
This allows us to remove a few lines of boilerplate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-17 12:15:39 -08:00
Randy Dunlap d29387e8de media/staging: fix allyesconfig build error
Fix x86 allyesconfig builds.  Builds fail due to a non-static variable
named 'debug' in drivers/staging/media/as102:

  arch/x86/built-in.o:arch/x86/kernel/entry_32.S:1296: first defined here
  ld: Warning: size of symbol `debug' changed from 90 in arch/x86/built-in.o to 4 in drivers/built-in.o

Thou shalt have no non-static identifiers that are named 'debug'.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Pierrick Hascoet <pierrick.hascoet@abilis.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-17 10:29:02 -02:00
Jesse Barnes 308e5bcbdb drm: add an fb creation ioctl that takes a pixel format v5
To properly support the various plane formats supported by different
hardware, the kernel must know the pixel format of a framebuffer object.
So add a new ioctl taking a format argument corresponding to a fourcc
name from the new drm_fourcc.h header file.  Implement the fb creation
hooks in terms of the new mode_fb_cmd2 using helpers where the old
bpp/depth values are needed.

v2: create DRM specific fourcc header file for sharing with libdrm etc
v3: fix rebase failure and use DRM fourcc codes in intel_display.c and
    update commit message
v4: make fb_cmd2 handle field into an array for multi-object formats
    pull in Ville's fix for the memcpy in drm_plane_init
    apply Ville's cleanup to zero out fb_cmd2 arg in drm_mode_addfb
v5: add 'flags' field for interlaced support (from Ville)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Reviewed-by: Rob Clark <rob.clark@linaro.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-15 19:53:23 +00:00
Arjan van de Ven e08e96de98 drm: Make the per-driver file_operations struct const
From fdf1fdebaa00f81de18c227f32f8074c8b352d50 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Sun, 30 Oct 2011 19:06:07 -0700
Subject: [PATCH] drm: Make the per-driver file_operations struct const

The DRM layer keeps a copy of struct file_operations inside its
big driver struct... which prevents it from being consistent and static.
For consistency (and the general security objective of having such things
static), it's desirable to get this fixed.

This patch splits out the file_operations field to its own struct,
which is then "static const", and just stick a pointer to this into
the driver struct, making it more consistent with how the rest of the
kernel does this.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11 11:14:47 +00:00
David Daney 8d804d4fdf STAGING: octeon-ethernet: Fix compile error caused by skb_frag_struct change
Evidently the definition of struct skb_frag_struct has changed, so we
need to change to match it.

Signed-off-by: David Daney <david.daney@cavium.com>
To: netdev@vger.kernel.org
To: gregkh@suse.de
To: devel@driverdev.osuosl.org
Patchwork: https://patchwork.linux-mips.org/patch/2909/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-11-09 17:14:27 +00:00
Sylwester Nawrocki 34490a0a3d [media] staging: as102: Eliminate as10x_handle_t alias
Remove pre-processor defined as10x_handle_t data type by directly
replacing it with struct as102_bus_adapter_t. phandle is renamed
to adap inside function bodies.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:33:25 -02:00
Sylwester Nawrocki d758b9ef7a [media] staging: as102: Define device name string pointers constant
Supresses following checkpatch warning:
WARNING: static const char * array should probably be static const char * const

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:32:42 -02:00
Sylwester Nawrocki a11726349c [media] staging: as102: Move variable declarations to the header
Fixes following checkpatch.pl warning:
WARNING: externs should be avoided in .c files

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:32:06 -02:00
Sylwester Nawrocki 3288e201a1 [media] staging: as102: Use linux/uaccess.h instead of asm/uaccess.h
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:31:25 -02:00
Sylwester Nawrocki c20ec0354f [media] staging: as102: Remove linkage specifiers for C++
The as10x_cmd.h header is not public so there should be no need
for an "extern "C"" in it.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:31:13 -02:00
Sylwester Nawrocki 7d462fe580 [media] staging: as102: Replace printk(KERN_<LEVEL> witk pr_<level>
While at it also correct some spelling errors.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:31:01 -02:00
Sylwester Nawrocki 14e0e4bf6c [media] staging: as102: Whitespace and indentation cleanup
Remove some unnecessary braces. Replace spaces with tabs where
expected. Replace gcc specific __FUNCTION__ with  C99 __func__.
No functional changes.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:30:46 -02:00
Sylwester Nawrocki 880102898f [media] staging: as102: Fix the dvb device registration error path
Release already acquired resources when error happens during
devices registration steps.
Use dev_err()  where struct device is available, instead of driver
specific err().

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:29:22 -02:00
Sylwester Nawrocki fa1a13f621 [media] staging: as102: Replace pragma(pack) with attribute __packed
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:28:55 -02:00
Sylwester Nawrocki 57753767dd [media] staging: as102: Make the driver select CONFIG_FW_LOADER
It doesn't seem to be of much advantage to compile in FW_LOADER
support conditionally, then make the driver always select FW_LOADER
and remove #idefs from the code.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:28:37 -02:00
Sylwester Nawrocki 82aae98df4 [media] staging: as102: Remove leftovers of the SPI bus driver
SPI bus driver support is not included in this module, the SPI
driver files are missing. But some bits are still present so
clean up the unused code.
The SPI driver support can be properly added later if needed.

Then CONFIG_AS102_SPI and CONFIG_AS102_USB is now not needed
and the pre-processor statements using these config options
can now be removed from *.c files.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:28:06 -02:00
Sylwester Nawrocki c06271e052 [media] staging: as102: Remove unnecessary typedefs
According to the kernel coding rules typedefs should be avoided,
so replace theit occurances with explicit enum/union types.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:24:44 -02:00
Piotr Chmura 7f033e3354 [media] staging: as102: Remove comment tags for editors configuration
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:24:25 -02:00
Linus Torvalds e0d65113a7 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (226 commits)
  mtd: tests: annotate as DANGEROUS in Kconfig
  mtd: tests: don't use mtd0 as a default
  mtd: clean up usage of MTD_DOCPROBE_ADDRESS
  jffs2: add compr=lzo and compr=zlib options
  jffs2: implement mount option parsing and compression overriding
  mtd: nand: initialize ops.mode
  mtd: provide an alias for the redboot module name
  mtd: m25p80: don't probe device which has status of 'disabled'
  mtd: nand_h1900 never worked
  mtd: Add DiskOnChip G3 support
  mtd: m25p80: add EON flash EN25Q32B into spi flash id table
  mtd: mark block device queue as non-rotational
  mtd: r852: make r852_pm_ops static
  mtd: m25p80: add support for at25df321a spi data flash
  mtd: mxc_nand: preset_v1_v2: unlock all NAND flash blocks
  mtd: nand: switch `check_pattern()' to standard `memcmp()'
  mtd: nand: invalidate cache on unaligned reads
  mtd: nand: do not scan bad blocks with NAND_BBT_NO_OOB set
  mtd: nand: wait to set BBT version
  mtd: nand: scrub BBT on ECC errors
  ...

Fix up trivial conflicts:
 - arch/arm/mach-at91/board-usb-a9260.c
	Merged into board-usb-a926x.c
 - drivers/mtd/maps/lantiq-flash.c
	add_mtd_partitions -> mtd_device_register vs changed to use
	mtd_device_parse_register.
2011-11-07 09:11:16 -08:00
Hans Verkuil 33cdf5b0e7 [media] solo6x10: fix broken Makefile
The Makefile used := instead of +=, this broke the compatibility build.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-07 09:54:45 -02:00
Hans Verkuil b3c7d453a0 [media] solo6x10: rename jpeg.h to solo6x10-jpeg.h
This header clashes with the jpeg.h in gspca when doing a compatibility
build using the media_build system.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-07 09:54:29 -02:00
Linus Torvalds 32aaeffbd4 Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include <linux/module.h>
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include <linux/module.h>
  net: sch_generic remove redundant use of <linux/module.h>
  net: inet_timewait_sock doesnt need <linux/module.h>
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
2011-11-06 19:44:47 -08:00
Linus Torvalds b4fdcb02f1 Merge branch 'for-3.2/core' of git://git.kernel.dk/linux-block
* 'for-3.2/core' of git://git.kernel.dk/linux-block: (29 commits)
  block: don't call blk_drain_queue() if elevator is not up
  blk-throttle: use queue_is_locked() instead of lockdep_is_held()
  blk-throttle: Take blkcg->lock while traversing blkcg->policy_list
  blk-throttle: Free up policy node associated with deleted rule
  block: warn if tag is greater than real_max_depth.
  block: make gendisk hold a reference to its queue
  blk-flush: move the queue kick into
  blk-flush: fix invalid BUG_ON in blk_insert_flush
  block: Remove the control of complete cpu from bio.
  block: fix a typo in the blk-cgroup.h file
  block: initialize the bounce pool if high memory may be added later
  block: fix request_queue lifetime handling by making blk_queue_cleanup() properly shutdown
  block: drop @tsk from attempt_plug_merge() and explain sync rules
  block: make get_request[_wait]() fail if queue is dead
  block: reorganize throtl_get_tg() and blk_throtl_bio()
  block: reorganize queue draining
  block: drop unnecessary blk_get/put_queue() in scsi_cmd_ioctl() and blk_get_tg()
  block: pass around REQ_* flags instead of broken down booleans during request alloc/free
  block: move blk_throtl prototypes to block/blk.h
  block: fix genhd refcounting in blkio_policy_parse_and_set()
  ...

Fix up trivial conflicts due to "mddev_t" -> "struct mddev" conversion
and making the request functions be of type "void" instead of "int" in
 - drivers/md/{faulty.c,linear.c,md.c,md.h,multipath.c,raid0.c,raid1.c,raid10.c,raid5.c}
 - drivers/staging/zram/zram_drv.c
2011-11-04 17:06:58 -07:00
Linus Torvalds 1046a2c428 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (144 commits)
  [media] saa7134.h: Suppress compiler warnings when CONFIG_VIDEO_SAA7134_RC is not set
  [media] it913x [VER 1.07] Support for single ITE 9135 devices
  [media] Support for Terratec G1
  [media] cx25821: off by one in cx25821_vidioc_s_input()
  [media] media: tea5764: reconcile Kconfig symbol and macro
  [media] omap_vout: Add poll() support
  [media] omap3isp: preview: Add crop support on the sink pad
  [media] omap3isp: preview: Rename min/max input/output sizes defines
  [media] omap3isp: preview: Remove horizontal averager support
  [media] omap3isp: Report the ISP revision through the media controller API
  [media] omap3isp: ccdc: remove redundant operation
  [media] omap3isp: Fix memory leaks in initialization error paths
  [media] omap3isp: Add missing mutex_destroy() calls
  [media] omap3isp: Move *_init_entities() functions to the init/cleanup section
  [media] omap3isp: Move media_entity_cleanup() from unregister() to cleanup()
  [media] MFC: Change MFC firmware binary name
  [media] vb2: add vb2_get_unmapped_area in vb2 core
  [media] v4l: Add v4l2 subdev driver for S5K6AAFX sensor
  [media] v4l: Add AUTO option for the V4L2_CID_POWER_LINE_FREQUENCY control
  [media] media: ov6650: stylistic improvements
  ...
2011-11-04 07:58:25 -07:00
Mauro Carvalho Chehab 4860c73804 staging: Move media drivers to staging/media
In practice, it is being hard to distinguish when a patch
should go to staging tree or to the media tree. Better
to distinguish it, by putting the media drivers at a
separate staging directory. Newer staging drivers that include
anything with "dvb*.h", "v4l2*.h" or "videodev2.h" should
go to the drivers/staging/media tree.

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:59:03 -02:00
Mauro Carvalho Chehab d6ce55de3a [media] move cx25821 out of staging
This driver had the major issues already fixed. Move it out
of staging.

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:58:21 -02:00
Sylwester Nawrocki 92e9d1b70f [media] staging: as102: Remove conditional compilation based on kernel version
Remove #if's related to kernel version and the code not applicable
to 3.2+ kernels.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:44:09 -02:00
Sylwester Nawrocki ff7029f5e8 [media] staging: as102: Unconditionally compile code dependent on DVB_CORE
The driver depends on DVB_CORE so there is no need for conditional
compilation of parts of the code depending on CONFIG_DVB_CORE as
the driver is never compiled with CONFIG_DVB_CORE* disabled.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:44:05 -02:00
Piotr Chmura 8be62e73e5 [media] staging: as102: Add nBox Tuner Dongle support
Add support for nBox Tuner Dongle based on the same chip.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:44:03 -02:00
Piotr Chmura 9d8e18b1e9 [media] staging: as102: Enable compilation
Fix compilation errors in the USB driver by replacing usb_buffer_free(),
usb_buffer_alloc() with usb_free_coherent() and usb_alloc_coherent().
Add entries for the driver in parent Makefile and Kconfig.

[snjw23@gmail.com: minor edit to changelog]
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:44:01 -02:00
Sylwester Nawrocki 3b4544a3a4 [media] staging: as102: Convert the comments to kernel-doc style
Also amend some mismatched comments.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:58 -02:00
Piotr Chmura f080c2ef54 [media] staging: as102: Remove non-linux headers inclusion
Remove inclusion of Windows and other not linux related headers.

[snjw23@gmail.com: edited changelog, folded long line in Makefile]
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:55 -02:00
Pierrick Hascoet 315cadc446 [media] staging: as102: Fix licensing oversight
Fix a couple of files which were supposed by be relicensed as GPL
but were overlooked.

Signed-off-by: Pierrick Hascoet <pierrick.hascoet@abilis.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:53 -02:00
Devin Heitmueller 4f7b7c01fd [media] staging: as102: Properly handle multiple product names
Properly handle the case where the driver can be associated with
multiple different products (as opposed to always saying the device
is named after the value in a #define).

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:51 -02:00
Devin Heitmueller 5f9745b2c9 [media] staging: as102: Add Elgato EyeTV DTT Deluxe
Add support for the Elgato EyeTV DTT Deluxe.  Note that the product name
field has not yet been abstracted out, so it will still identify itself
as a PCTV 74e.  The driver was originally built by the chipset manufacturer
so that the product vendor can specify the device name via a #define, but
wasn't setup to support multiple products from the same build of the driver.

Thanks to Joerg Unglaub for suggesting this change.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:48 -02:00
Devin Heitmueller e2e02ca488 [media] staging: as102: Fix CodingStyle errors in file as10x_cmd_cfg.c
Fix Linux kernel coding style (whitespace and indentation) errors
in file as10x_cmd_cfg.c. No functional changes.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:46 -02:00
Devin Heitmueller c7a6c00194 [media] staging: as102: Fix CodingStyle errors in file as102_usb_drv.c
Fix Linux kernel coding style (whitespace and indentation) errors
in file as102_usb_drv.c. No functional changes.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:44 -02:00
Devin Heitmueller 87ad567e25 [media] staging: as102: Fix CodingStyle errors in file as102_fe.c
Fix Linux kernel coding style (whitespace and indentation) errors
in file as102_fe.c. No functional changes.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:09 -02:00
Devin Heitmueller 79848e9afb [media] staging: as102: Fix CodingStyle errors in file as10x_cmd_stream.c
Fix Linux kernel coding style (whitespace and indentation) errors
in file as10x_cmd_stream.c. No functional changes.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:06 -02:00
Devin Heitmueller 9cc08121f1 [media] staging: as102: Fix CodingStyle errors in file as10x_cmd.c
Fix Linux kernel coding style (whitespace and indentation) errors
in file as10x_cmd.c. No functional changes.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:04 -02:00
Devin Heitmueller e54d081dac [media] staging: as102: Fix CodingStyle errors in file as102_fw.c
Fix Linux kernel coding style (whitespace and indentation) errors
in file as102_fw.c. No functional changes.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:43:00 -02:00
Devin Heitmueller c6ccdca980 [media] staging: as102: Fix CodingStyle errors in file as102_drv.c
Fix Linux kernel coding style (whitespace and indentation) errors
in file as102_drv.c.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:42:54 -02:00
Pierrick Hascoet 41b44e0418 [media] staging: as102: Initial import from Abilis
Changes by Devin Heitmueller:

Import the original Abilis Systems as102 driver.  The source is unmodified,
with the only changes I've made so far were that I created a Kconfig and
Makefile so that the code builds in a standard v4l-dvb tree.

This driver requires firmware (which Abilis has provided with redistribution
terms which will allow it to be bundled in the Linux distributions).   The
firmware can be downloaded from here:

Thanks to Rainer Miethling from PCTV Systems for working to get the driver
released (for use with the PCTV 74e) and Pierrick Hascoet from Abilis for
authoring the driver.

Changes by Piotr Chmura:
 - moved the driver from media/dvb to staging/media
 - removed Makefile/Kconfig - compilation fails in current tree

[snjw23@gmail.com: edited changelog]
Signed-off-by: Pierrick Hascoet <pierrick.hascoet@abilis.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03 07:42:49 -02:00
Miklos Szeredi bfe8684869 filesystems: add set_nlink()
Replace remaining direct i_nlink updates with a new set_nlink()
updater function.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-02 12:53:43 +01:00
Linus Torvalds 094803e0aa Merge branch 'akpm' (Andrew's incoming)
Quoth Andrew:

 - Most of MM.  Still waiting for the poweroc guys to get off their
   butts and review some threaded hugepages patches.

 - alpha

 - vfs bits

 - drivers/misc

 - a few core kerenl tweaks

 - printk() features

 - MAINTAINERS updates

 - backlight merge

 - leds merge

 - various lib/ updates

 - checkpatch updates

* akpm: (127 commits)
  epoll: fix spurious lockdep warnings
  checkpatch: add a --strict check for utf-8 in commit logs
  kernel.h/checkpatch: mark strict_strto<foo> and simple_strto<foo> as obsolete
  llist-return-whether-list-is-empty-before-adding-in-llist_add-fix
  wireless: at76c50x: follow rename pack_hex_byte to hex_byte_pack
  fat: follow rename pack_hex_byte() to hex_byte_pack()
  security: follow rename pack_hex_byte() to hex_byte_pack()
  kgdb: follow rename pack_hex_byte() to hex_byte_pack()
  lib: rename pack_hex_byte() to hex_byte_pack()
  lib/string.c: fix strim() semantics for strings that have only blanks
  lib/idr.c: fix comment for ida_get_new_above()
  lib/percpu_counter.c: enclose hotplug only variables in hotplug ifdef
  lib/bitmap.c: quiet sparse noise about address space
  lib/spinlock_debug.c: print owner on spinlock lockup
  lib/kstrtox: common code between kstrto*() and simple_strto*() functions
  drivers/leds/leds-lp5521.c: check if reset is successful
  leds: turn the blink_timer off before starting to blink
  leds: save the delay values after a successful call to blink_set()
  drivers/leds/leds-gpio.c: use gpio_get_value_cansleep() when initializing
  drivers/leds/leds-lm3530.c: add __devexit_p where needed
  ...
2011-10-31 17:46:07 -07:00
Joe Perches b9075fa968 treewide: use __printf not __attribute__((format(printf,...)))
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.

Done via script and a little typing.

$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
  grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
  xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches <joe@perches.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-31 17:30:54 -07:00
Paul Gortmaker 452962366c staging: Add module.h to more drivers implicitly using it.
This 2nd batch of implicit module.h users only appeared when we
removed the unnecessary module.h from include/linux/miscdevice.h
[The 1st batch is already present in Greg's staging tree.]

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:32:10 -04:00
Paul Gortmaker 3f934e00a4 staging: Add moduleparam.h to drivers/staging files as required
These files are using moduleparam infrastructure and were getting
that via the implicit module.h presence that we are phasing out.
So they'll need to include moduleparam.h explicitly in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:32:09 -04:00
Paul Gortmaker 8e336a722b staging: Add export.h for THIS_MODULE/EXPORT_SYMBOL to drivers/staging users.
Lots of drivers have in the past expected the presence of basic things
like THIS_MODULE and EXPORT_SYMBOL.  With the header cleanup, they wont
have these.  Call out the include explicitly.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:32:08 -04:00
Linus Torvalds 1eb6337835 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (348 commits)
  [media] pctv452e: Remove bogus code
  [media] adv7175: Make use of media bus pixel codes
  [media] media: vb2: fix incorrect return value
  [media] em28xx: implement VIDIOC_ENUM_FRAMESIZES
  [media] cx23885: Stop the risc video fifo before reconfiguring it
  [media] cx23885: Avoid incorrect error handling and reporting
  [media] cx23885: Avoid stopping the risc engine during buffer timeout
  [media] cx23885: Removed a spurious function cx23885_set_scale()
  [media] cx23885: v4l2 api compliance, set the audioset field correctly
  [media] cx23885: hook the audio selection functions into the main driver
  [media] cx23885: add generic functions for dealing with audio input selection
  [media] cx23885: fixes related to maximum number of inputs and range checking
  [media] cx23885: Initial support for the MPX-885 mini-card
  [media] cx25840: Ensure AUDIO6 and AUDIO7 trigger line-in baseband use
  [media] cx23885: Enable audio line in support from the back panel
  [media] cx23885: Allow the audio mux config to be specified on a per input basis
  [media] cx25840: Enable support for non-tuner LR1/LR2 audio inputs
  [media] cx23885: Name an internal i2c part and declare a bitfield by name
  [media] cx23885: Ensure VBI buffers timeout quickly - bugfix for vbi hangs during streaming
  [media] cx23885: remove channel dump diagnostics when a vbi buffer times out
  ...

Fix up trivial conflicts in drivers/misc/altera-stapl/altera.c (header
file rename vs add)
2011-10-31 15:42:54 -07:00
Linus Torvalds acff987d94 Merge branch 'fbdev-next' of git://github.com/schandinat/linux-2.6
* 'fbdev-next' of git://github.com/schandinat/linux-2.6: (270 commits)
  video: platinumfb: Add __devexit_p at necessary place
  drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data
  drivers/video: fsl-diu-fb: merge diu_hw into fsl_diu_data
  drivers/video: fsl-diu-fb: only DIU modes 0 and 1 are supported
  drivers/video: fsl-diu-fb: remove unused panel operating mode support
  drivers/video: fsl-diu-fb: use an enum for the AOI index
  drivers/video: fsl-diu-fb: add several new video modes
  drivers/video: fsl-diu-fb: remove broken screen blanking support
  drivers/video: fsl-diu-fb: move some definitions out of the header file
  drivers/video: fsl-diu-fb: fix some ioctls
  video: da8xx-fb: Increased resolution configuration of revised LCDC IP
  OMAPDSS: picodlp: add missing #include <linux/module.h>
  fb: fix au1100fb bitrot.
  mx3fb: fix NULL pointer dereference in screen blanking.
  video: irq: Remove IRQF_DISABLED
  smscufx: change edid data to u8 instead of char
  OMAPDSS: DISPC: zorder support for DSS overlays
  OMAPDSS: DISPC: VIDEO3 pipeline support
  OMAPDSS/OMAP_VOUT: Fix incorrect OMAP3-alpha compatibility setting
  video/omap: fix build dependencies
  ...

Fix up conflicts in:
 - drivers/staging/xgifb/XGI_main_26.c
	Changes to XGIfb_pan_var()
 - drivers/video/omap/{lcd_apollon.c,lcd_ldp.c,lcd_overo.c}
	Removed (or in the case of apollon.c, merged into the generic
	DSS panel in drivers/video/omap2/displays/panel-generic-dpi.c)
2011-10-30 15:30:01 -07:00
Linus Torvalds 37be944a02 Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux
* 'drm-core-next' of git://people.freedesktop.org/~airlied/linux: (290 commits)
  Revert "drm/ttm: add a way to bo_wait for either the last read or last write"
  Revert "drm/radeon/kms: add a new gem_wait ioctl with read/write flags"
  vmwgfx: Don't pass unused arguments to do_dirty functions
  vmwgfx: Emulate depth 32 framebuffers
  drm/radeon: Lower the severity of the radeon lockup messages.
  drm/i915/dp: Fix eDP on PCH DP on CPT/PPT
  drm/i915/dp: Introduce is_cpu_edp()
  drm/i915: use correct SPD type value
  drm/i915: fix ILK+ infoframe support
  drm/i915: add DP test request handling
  drm/i915: read full receiver capability field during DP hot plug
  drm/i915/dp: Remove eDP special cases from bandwidth checks
  drm/i915/dp: Fix the math in intel_dp_link_required
  drm/i915/panel: Always record the backlight level again (but cleverly)
  i915: Move i915_read/write out of line
  drm/i915: remove transcoder PLL mashing from mode_set per specs
  drm/i915: if transcoder disable fails, say which
  drm/i915: set watermarks for third pipe on IVB
  drm/i915: export a CPT mode set verification function
  drm/i915: fix transcoder PLL select masking
  ...
2011-10-28 05:54:23 -07:00
Linus Torvalds cc21fe518a Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Hyper-V: Integrate the clocksource with Hyper-V detection code

Fix up conflicts in drivers/staging/hv/Makefile manually (some of the hv
code has moved out of staging to drivers/hv/)
2011-10-28 05:08:40 -07:00
Linus Torvalds edb34a4dbd Remove stale "depends on NETDEV_1000"in staging drivers
Mark Einon points out that the Kconfig option for NETDEV_1000 no longer
exists, and the merge of the staging drivers should have removed that
for the et131x driver.

And while checking for it, I noticed that slicoss had the same stale
dependency.  Remove that one too.

Reported-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-26 17:21:19 +02:00
Linus Torvalds aa77677e0a Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1519 commits)
  staging: et131x: Remove redundant check and return statement
  staging: et131x: Mainly whitespace changes to appease checkpatch
  staging: et131x: Remove last of the forward declarations
  staging: et131x: Remove even more forward declarations
  staging: et131x: Remove yet more forward declarations
  staging: et131x: Remove more forward declarations
  staging: et131x: Remove forward declaration of et131x_adapter_setup
  staging: et131x: Remove some forward declarations
  staging: et131x: Remove unused rx_ring.recv_packet_pool
  staging: et131x: Remove call to find pci pm capability
  staging: et131x: Remove redundant et131x_reset_recv() call
  staging: et131x: Remove unused rx_ring.recv_buffer_pool
  Staging: bcm: Fix three initialization errors in InterfaceDld.c
  Staging: bcm: Fix coding style issues in InterfaceDld.c
  staging:iio:dac: Add AD5360 driver
  staging:iio:trigger:bfin-timer: Fix compile error
  Staging: vt6655: add some range checks before memcpy()
  Staging: vt6655: whitespace fixes to iotcl.c
  Staging: vt6656: add some range checks before memcpy()
  Staging: vt6656: whitespace cleanups in ioctl.c
  ...

Fix up conflicts in:
 - drivers/{Kconfig,Makefile}, drivers/staging/{Kconfig,Makefile}:
	vg driver movement
 - drivers/staging/brcm80211/brcmfmac/{dhd_linux.c,mac80211_if.c}:
	driver removal vs now stale changes
 - drivers/staging/rtl8192e/r8192E_core.c:
	driver removal vs now stale changes
 - drivers/staging/et131x/et131*:
	driver consolidation into one file, tried to do fixups
2011-10-26 15:39:02 +02:00
Linus Torvalds efb8d21b2c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (79 commits)
  TTY: serial_core: Fix crash if DCD drop during suspend
  tty/serial: atmel_serial: bootconsole removed from auto-enumerates
  Revert "TTY: call tty_driver_lookup_tty unconditionally"
  tty/serial: atmel_serial: add device tree support
  tty/serial: atmel_serial: auto-enumerate ports
  tty/serial: atmel_serial: whitespace and braces modifications
  tty/serial: atmel_serial: change platform_data variable name
  tty/serial: RS485 bindings for device tree
  TTY: call tty_driver_lookup_tty unconditionally
  TTY: pty, release tty in all ptmx_open fail paths
  TTY: make tty_add_file non-failing
  TTY: drop driver reference in tty_open fail path
  8250_pci: Fix kernel panic when pch_uart is disabled
  h8300: drivers/serial/Kconfig was moved
  parport_pc: release IO region properly if unsupported ITE887x card is found
  tty: Support compat_ioctl get/set termios_locked
  hvc_console: display printk messages on console.
  TTY: snyclinkmp: forever loop in tx_load_dma_buffer()
  tty/n_gsm: avoid fifo overflow in gsm_dlci_data_output
  tty/n_gsm: fix a bug in gsm_dlci_data_output (adaption = 2 case)
  ...

Fix up Conflicts in:
 - drivers/tty/serial/8250_pci.c
	Trivial conflict with removed duplicate device ID
 - drivers/tty/serial/atmel_serial.c
	Annoying silly conflict between "specify the port num via
	platform_data" and other changes to atmel_console_init
2011-10-26 15:11:09 +02:00
Linus Torvalds 8a9ea3237e Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1745 commits)
  dp83640: free packet queues on remove
  dp83640: use proper function to free transmit time stamping packets
  ipv6: Do not use routes from locally generated RAs
  |PATCH net-next] tg3: add tx_dropped counter
  be2net: don't create multiple RX/TX rings in multi channel mode
  be2net: don't create multiple TXQs in BE2
  be2net: refactor VF setup/teardown code into be_vf_setup/clear()
  be2net: add vlan/rx-mode/flow-control config to be_setup()
  net_sched: cls_flow: use skb_header_pointer()
  ipv4: avoid useless call of the function check_peer_pmtu
  TCP: remove TCP_DEBUG
  net: Fix driver name for mdio-gpio.c
  ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT
  rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces
  ipv4: fix ipsec forward performance regression
  jme: fix irq storm after suspend/resume
  route: fix ICMP redirect validation
  net: hold sock reference while processing tx timestamps
  tcp: md5: add more const attributes
  Add ethtool -g support to virtio_net
  ...

Fix up conflicts in:
 - drivers/net/Kconfig:
	The split-up generated a trivial conflict with removal of a
	stale reference to Documentation/networking/net-modules.txt.
	Remove it from the new location instead.
 - fs/sysfs/dir.c:
	Fairly nasty conflicts with the sysfs rb-tree usage, conflicting
	with Eric Biederman's changes for tagged directories.
2011-10-25 13:25:22 +02:00
Linus Torvalds 59e5253417 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (59 commits)
  MAINTAINERS: linux-m32r is moderated for non-subscribers
  linux@lists.openrisc.net is moderated for non-subscribers
  Drop default from "DM365 codec select" choice
  parisc: Kconfig: cleanup Kernel page size default
  Kconfig: remove redundant CONFIG_ prefix on two symbols
  cris: remove arch/cris/arch-v32/lib/nand_init.S
  microblaze: add missing CONFIG_ prefixes
  h8300: drop puzzling Kconfig dependencies
  MAINTAINERS: microblaze-uclinux@itee.uq.edu.au is moderated for non-subscribers
  tty: drop superfluous dependency in Kconfig
  ARM: mxc: fix Kconfig typo 'i.MX51'
  Fix file references in Kconfig files
  aic7xxx: fix Kconfig references to READMEs
  Fix file references in drivers/ide/
  thinkpad_acpi: Fix printk typo 'bluestooth'
  bcmring: drop commented out line in Kconfig
  btmrvl_sdio: fix typo 'btmrvl_sdio_sd6888'
  doc: raw1394: Trivial typo fix
  CIFS: Don't free volume_info->UNC until we are entirely done with it.
  treewide: Correct spelling of successfully in comments
  ...
2011-10-25 12:11:02 +02:00
Greg Kroah-Hartman 43a3beb6da Merge branch 'staging-next' into Linux 3.1
This was done to resolve a conflict in the
drivers/staging/comedi/drivers/ni_labpc.c file that resolved a build
bugfix in Linus's tree with a "better" bugfix that was in the
staging-next tree that resolved the issue in a more complete manner.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-25 09:18:11 +02:00
David S. Miller 1805b2f048 Merge branch 'master' of ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2011-10-24 18:18:09 -04:00
Mark Einon 68cf162a1a staging: et131x: Remove redundant check and return statement
In nic_send_packet(), by the time 'frag' is checked to be zero, it never
is - the for loop has been entered (as nr_frags is always > 0) and frag
has been incremented at least once. Remove the check and associated
error return.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:13 +02:00
Mark Einon 09a3fc2bf1 staging: et131x: Mainly whitespace changes to appease checkpatch
- Whitespace changes to appease checkpatch warnings
- Removed unneeded braces around single line if/else

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:13 +02:00
Mark Einon 8310c60238 staging: et131x: Remove last of the forward declarations
Moved functions in et131x.c file to remove the forward declarations of:

et131x_rx_dma_disable
et131x_rx_dma_enable
et131x_init_send
et131x_tx_dma_enable

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:13 +02:00
Mark Einon 2288760e3b staging: et131x: Remove even more forward declarations
Moved functions in et131x.c file to remove the forward declarations of:

et1310_in_phy_coma
et1310_phy_access_mii_bit
et131x_phy_mii_read
et131x_mii_write
et131x_rx_dma_memory_free

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:13 +02:00
Mark Einon a4d444bdef staging: et131x: Remove yet more forward declarations
Moved functions in et131x.c file to remove the forward declarations of:

et1310_setup_device_for_multicast
et1310_setup_device_for_unicast
et131x_up
et131x_down
et131x_enable_txrx
et131x_disable_txrx

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:13 +02:00
Mark Einon 5da2b1581a staging: et131x: Remove more forward declarations
Moved functions in et131x.c file to remove the following forward
declarations:

et131x_soft_reset
et131x_isr_handler
et131x_device_alloc

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:12 +02:00
Mark Einon 36f2771a70 staging: et131x: Remove forward declaration of et131x_adapter_setup
Also associated function movements within et131x.c file

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:12 +02:00
Mark Einon 44012dfe4e staging: et131x: Remove some forward declarations
Moved functions in et131x.c file to remove the following forward
declarations:

et131x_align_allocated_memory
et131x_disable_interrupts
et131x_enable_interrupts
et131x_error_timer_handler

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:12 +02:00
Mark Einon c018a5f11d staging: et131x: Remove unused rx_ring.recv_packet_pool
tx_ring.recv_packet_pool is unused, even in the original driver code.
Removed.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:12 +02:00
Mark Einon ac8f4837f2 staging: et131x: Remove call to find pci pm capability
pci_find_capability is called, but not used and is now redundant as
power management is handled elsewhere. Removed.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:12 +02:00
Mark Einon 5ad5be581e staging: et131x: Remove redundant et131x_reset_recv() call
This call doesn't do anything useful - only warns on the receive list
being empty, so removed it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:11 +02:00
Mark Einon 16d8de3cc9 staging: et131x: Remove unused rx_ring.recv_buffer_pool
rx_ring.recv_buffer_pool is unused, even in the original driver code.
Remove from stuct, and also remove some comments regarding it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 11:35:11 +02:00
Kevin McKinney a86581829f Staging: bcm: Fix three initialization errors in InterfaceDld.c
This patch fixes three initialization errors.
One is an incorrect initialization of a static
variable. The other two are incorrect
initializations in an if statement. These
errors were found by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:16:34 +02:00
Kevin McKinney a5e4b81e27 Staging: bcm: Fix coding style issues in InterfaceDld.c
This patch fixes multiple coding style issues in file,
InterfaceDld.c, found by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:16:34 +02:00
Lars-Peter Clausen a3e2940c24 staging:iio:dac: Add AD5360 driver
This patch adds support for the Analog Devices AD5360, AD5361, AD5362, AD5363,
AD5370, AD5371, AD5372, AD5373 multi-channel digital-to-analog converters.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:15:02 +02:00
Lars-Peter Clausen dafb7d1bd0 staging:iio:trigger:bfin-timer: Fix compile error
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:15:02 +02:00
Dan Carpenter 0c849b3c16 Staging: vt6655: add some range checks before memcpy()
There were no range checks in the original code so the user could
write past the end of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:13:20 +02:00
Dan Carpenter 0d3eb2b29f Staging: vt6655: whitespace fixes to iotcl.c
The indents didn't line up at all in the original code.  I also fixed
a bunch of other white issues as I went along.  I changed the comment
style and removed some commented out code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:13:20 +02:00
Dan Carpenter 44ec5d2916 Staging: vt6656: add some range checks before memcpy()
We need to verify that we're not writing past the end of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:13:20 +02:00
Dan Carpenter 883aeecc9d Staging: vt6656: whitespace cleanups in ioctl.c
The indents on this file didn't line up so it was hard to work with.
I changed other white space issues as I came across them.  I also
deleted or changed some couple comments and the comment style.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:13:19 +02:00
Mark Einon 4fb544c947 staging: et131x: Remove unused defines
Some defines are no longer referenced in the code, so removed them.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:12 +02:00
Mark Einon 26dc751e25 staging: et131x: Convert rest of pci memory management to dma api
Replaced pci map/unmap and set_mask calls with their dma equivalents.
Also updated comments to reflect this.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:12 +02:00
Mark Einon 06709e9623 staging: et131x: on transmit, stop the queue if the next packet will fail
* Currently the tx queue is only stopped when the current packet fails.
Check if the next packet will fail, and stop the queue if so.

* Removed associated item from TODO list in the README.

* Also minor fixup as adapter was being declared as null and immediately set
to a value.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:12 +02:00
Mark Einon 26d19bf60b staging: et131x: Tidy up PCI device table definition
Used the convenience macros DEFINE_PCI_DEVICE_TABLE and PCI_VDEVICE to
tidy up the device table definition.

Also remove the corresponding TODO item from the README.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:12 +02:00
Mark Einon 675c8f68ca staging: et131x: Match dma_alloc_ calls with dma_free_ calls
Previous update was to replace pci_alloc with dma_alloc calls. I missed
replacing the corresponding pci_free_ calls with the dma versions. Now
done. Thanks to Denis Kirjanov <kirjanov@gmail.com> for pointing this
out.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:11 +02:00
Mark Einon 0d1b7a84d3 staging: et131x: use dma_alloc... instead of pci_alloc...
Use dma_allocs instead of pci_allocs, so we can use GFP_KERNEL
allocations.

Also removed this item from the TODO list

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:11 +02:00
Mark Einon e592a9b06c staging: et131x: Fix issues when USE_FBR0 is not defined
* Following on from making rx_ring.fbr use a common structure - reversed
the fbr[] array indicies so that index 1 = FBR0 and index 0 = FBR1,
which allows USE_FBR0 define to work.

* Also fixed up minor issues where indexes into the array were out of
bounds in some places.

* Removed rx_ring.fbr common stuct TODO item from README

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:11 +02:00
Mark Einon 6abafc164c staging: et131x: Make rx_ring.fbr{0,1} share a common structure
Sharing a common structure by moving common structure items into
fbr_lookup.

TODO - Currently will not work if USE_FBR0 = 0 as FBR1 uses fbr[1]
which is removed in this case

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:11 +02:00
Mark Einon 920d74a405 staging: et131x: Moving two extern inline functions to .c file
Two helper functions for adding 10bit/12bit umbers with wrapping are
defined in the header. Moved them to the driver .c file.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:10 +02:00
Mark Einon 82e4b35f4d staging: et131x: Update TODO list - remove 'put driver into single file'
Driver now resides in a single file with a separate header with
registers, updated the README TODO list.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:10 +02:00
Mark Einon 17ec9ff32c staging: et131x: move et1310_tx.h contents into et131x.c
Move et1310_tx.h contents into et131x.c and delete et1310_tx.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:10 +02:00
Mark Einon 562550b02b staging: et131x: move et1310_rx.h contents into et131x.c
Move et1310_rx.h contents into et131x.c and delete et1310_rx.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:10 +02:00
Mark Einon 1c1c1b5fda staging: et131x: move et131x_defs.h contents into et131x.c
Move et131x_defs.h contents into et131x.c and delete et131x_defs.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:09 +02:00
Mark Einon fd0651a6d1 staging: et131x: move et131x_adapter.h contents into et131x.c
Move et131x_adapter.h contents into et131x.c and delete et131x_adapter.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:09 +02:00
Mark Einon 2b2b9554de staging: et131x: move et1310_phy.h contents into et131x.h
Move et1310_phy.h register defines into et131x.h and delete
et1310_phy.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:09 +02:00
Mark Einon 01df6aa263 staging: et131x: move et1310_address_map.h contents into et131x.h
Move et1310_address_map.h register defines into et131x.h and delete
et1310_address_map.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:09 +02:00
Mark Einon bd156af600 staging: et131x: Move non-register defines from et131x.h to et131x.c
Header file should only have register defines, moved non-register
defines to et131x.c

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:08 +02:00
Mark Einon 2d0c64ad04 staging: et131x: Move function declarations from et131x.h to et131x.c
The function declarations in et131x.h are no longer used now all
functions are in one file. Removed declarations from et131x.h and
added any required forward declarations to et131x.c.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:07:08 +02:00
Mark Einon d2796743cb staging: et131x: Put all .c files into one big file
Created one big .c file for the driver, moving the contents of all
driver .c files into it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:03:40 +02:00
Lars-Peter Clausen cd8eca6f77 staging:iio:dac:ad5686: Check for negative values
Currently it is possible to write negative values to the ad5686's raw attribute.
This will cause undefined behaviour, so reject negative values.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:57:05 -07:00
Lars-Peter Clausen 75bb23a215 staging:iio:dac:ad5791: Fix scale unit
Scale is currently reported in volts instead of millivolts. This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:57:01 -07:00
Lars-Peter Clausen f1a61a8888 staging:iio:dac:ad5791: Convert attributes to new naming spec
Add the missing "voltage" chan_type to the powerdown attributes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:57:01 -07:00
Lars-Peter Clausen 9dc9961dca staging:iio:dac:ad5791: Allow asymmetrical reference voltages
The ad5791 currently assumes that the negative and positive supply have the
same absolute value, which is not necessarily true. This patch introduces a
offset attribute which will contain the negative supply voltage scaled
according to the iio spec. The raw attribute now accepts values in the range
of 0 to max instead of -max/2 to max/2.

While we are at it also fix the vref span calculation. Since both positive and
negative reference voltages are specificed as absolute values we need to add
them and not subtract them to get the reference voltage span.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:57:01 -07:00
Lars-Peter Clausen 021c0a381c staging:iio:dac:ad5791: Use correct DAC bit-size
Commit c5b99396 ("staging:iio:dac:ad5791 chan spec conversion.") introduced a
small bug, using storagebits instead of realbits throughout the driver, which
causes the driver to work incorrectly. This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:57:00 -07:00
Michael Hennerich 1b99232077 iio: cdc: Fix pushed event code - Typo, should be IIO_CAPACITANCE.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:55:44 -07:00
Michael Hennerich 5c48cb9de1 iio: adc: Relocate Capacitance to Digital Converters (CDC) into own subdir
No functional changes.
Fix Kconfig description.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:55:43 -07:00
Michael Hennerich e63abd0a1b iio: Spell fix - consistent use of Converter - no functional changes
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:55:31 -07:00
Lars-Peter Clausen fcf265d68d staging:iio:dac: Add AD5064 driver
This patch adds support for the Analog Devices AD6064, AD6064-1, AD6044, AD6024
quad channel digital-to-analog converter devices.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:50:20 -07:00
Vladimir Zapolskiy fcde2bf0b9 staging: tidspbridge: MMU2 registers are limited to 32-bit data access
According to OMAP3 TRM access to MMU registers shall be strictly 32-bit
aligned.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:42:49 -07:00
Dan Carpenter 6b7200fe0a Staging: vt6655: memory corruption in check in wpa_set_wpadev()
The original code left it up to the user to decide how much data to
copy, but that doesn't work with a fixed size array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:42:48 -07:00
Jens Axboe 5c04b426f2 Merge branch 'v3.1-rc10' into for-3.2/core
Conflicts:
	block/blk-core.c
	include/linux/blkdev.h

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-10-19 14:30:42 +02:00
Eric Dumazet 9e903e0852 net: add skb frag size accessors
To ease skb->truesize sanitization, its better to be able to localize
all references to skb frags size.

Define accessors : skb_frag_size() to fetch frag size, and
skb_frag_size_{set|add|sub}() to manipulate it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-19 03:10:46 -04:00
Greg Kroah-Hartman 4535743304 Staging: rtl8192u: ieee80211: Makefile: remove unneeded stuff
There's a lot of unused and unneeded things in this makefile, so delete
it all.

Reported-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-18 13:36:18 -07:00
Greg Kroah-Hartman 5f9819c709 Staging: wlags49_h25: Makefile: remove unneeded stuff
There's a lot of unused and unneeded things in this makefile, so delete
it all.

Reported-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-18 13:36:04 -07:00
Greg Kroah-Hartman 74116f561a Staging: wlags49_h2: Makefile: remove unneeded stuff
There's a lot of unused and unneeded things in this makefile, so delete
it all.

Reported-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-18 13:34:59 -07:00
Dave Airlie 017ed8012e Merge tag 'v3.1-rc10' into drm-core-next
There are a number of fixes in mainline required for code in -next,
also there was a few conflicts I'd rather resolve myself.

Signed-off-by: Dave Airlie <airlied@redhat.com>

Conflicts:
	drivers/gpu/drm/radeon/evergreen.c
	drivers/gpu/drm/radeon/r600.c
	drivers/gpu/drm/radeon/radeon_asic.h
2011-10-18 10:54:30 +01:00
Oren Weil d199fb7d6d staging: mei: clean the TODO file from done tasks.
1) We move the AMT Watchdog to use the kernel watchdog core.
the new code is still part of the MEI driver.
we didn't find any good reason to extract the the MEI driver watchdog code
from the MEI Driver to a new module.

2) Since the watchdog remains in the mei driver, exposing in-kernel
API just for AMTHI is unnecessary.

MEI new Watchdog Core Interface Patches set:
https://lkml.org/lkml/2011/9/7/26

3) Code cleanup (init and probe, bug_on usage, headers and etc) was
submitted in previous patches.

Patches:
https://lkml.org/lkml/2011/9/21/231
https://lkml.org/lkml/2011/6/15/358
https://lkml.org/lkml/2011/7/7/177
https://lkml.org/lkml/2011/9/7/38
https://lkml.org/lkml/2011/9/7/37
https://lkml.org/lkml/2011/9/7/28

4) mei.txt was updated with additional information.

Patch:
https://lkml.org/lkml/2011/10/16/52

Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:46:48 -07:00
Manohar Vanga 0a4b6b0279 staging: vme_user: rename USER_BUS_MAX to VME_USER_BUS_MAX
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:43:13 -07:00
Manohar Vanga a916a391d3 staging: vme: get rid of struct vme_device_id and slots
Previously, the device-driver matching mechanism depended on the
vme_device_id structure due to the need for a bind table per driver.
This method of matching is no longer used so this patch merges the
fields of struct vme_device_id into struct vme_dev. Since this also
renders the slot field meaningless, it has also been removed in this
patch.

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:43:13 -07:00
Manohar Vanga 5d6abf379d staging: vme: make match() driver specific to improve non-VME64x support
For jumper based boards (non VME64x), there is no mechanism
for detecting the card that is plugged into a specific slot. This
leads to issues in non-autodiscovery crates/cards when a card is
plugged into a slot that is "claimed" by a different driver. In
reality, there is no problem, but the driver rejects such a
configuration due to its dependence on the concept of slots.

This patch makes the concept of slots less critical and pushes the
driver match() to individual drivers (similar to what happens in the
ISA bus in driver/base/isa.c). This allows drivers to register the
number of devices that they expect without any restrictions. Devices
in this new model are now formatted as $driver_name-$bus_id.$device_id
(as compared to the earlier vme-$bus_id.$slot_number).

This model also makes the device model more logical as devices
are only registered when they actually exist whereas earlier,
a set of devices were being created automatically regardless of
them actually being there.

Another change introduced in this patch is that devices are now created
within the VME driver structure rather than in the VME bridge structure.
This way, things don't go haywire if the bridge driver is removed while
a driver is using it.

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:43:13 -07:00
Manohar Vanga 8f966dc444 staging: vme: add struct vme_dev for VME devices
Instead of using a vanilla 'struct device' for VME devices, add new
'struct vme_dev'. Modifications have been made to the VME framework
API as well as all in-tree VME drivers.

The new vme_dev structure has the following advantages from the
current model used by the driver:

    * Driver functions (probe, remove) now receive a VME device
      instead of a pointer to the bridge device (cleaner design)
    * It's easier to differenciate API calls as bridge-based or
      device-based (ie. cleaner interface).

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:43:13 -07:00
Jonathan Cameron 9ad2e2e1d6 staging:iio:dummy Add buffered reading support
Very simple buffered reading.  Did not provide a trigger as
the sysfs trigger already meets that requirement.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:36:30 -07:00
Jonathan Cameron e6477000fc staging:iio:dummy Add event support + fake event generator
The event generator is not very pretty but does the job and
allows this driver to look a lot more like a normal driver
than it otherwise would.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:36:30 -07:00
Jonathan Cameron 3a84331db2 staging:iio:Documentation Simple dummy driver to explain the basics
The documenation explaining how to go about writing a driver is lagging
horribly, so here is another approach; an actual driver with
lots of explanatory comments.

Note it is currently minimal in that there are no events and no
buffer.  With care they can probably be added in additional files
without messing up the clarity of what we have here.

V2: Addressed some of Manuel Stahl's feedback.

Fixed up kernel doc.
Added more general description.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:36:29 -07:00
Jonathan Cameron 9c95e01e84 staging:iio:adc:max1363 incorrect allocation of available_scanmasks
Longs are not known for being 8 bits.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:35:32 -07:00
Jonathan Cameron d2fffd6c2f staging:iio: fix removal path to allow correct freeing.
Fix a dumb lack of consideration of the effect of combining
the iio_device_unregister and iio_free_device calls into
one.  There is no valid place to free some of the sysfs
array elements.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:34:53 -07:00
Michael Hennerich cdea0bec8d iio: adc: remove ADT75 driver - hwmon/lm75 will take over ADT75 support
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:33:20 -07:00
Jonathan Cameron 3e2c96eab9 staging:iio: gpio build dependency fixing
Numerous drivers either had pointless includes of gpio.h
or should have been dependent on GENERIC_GPIO and were not.
Conversion of ads1210 to use array registration triggered
build failures that highlighted all was not well.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:25:28 -07:00
K. Y. Srinivasan 41098f8f14 Staging: hv: storvsc: Fix checkpatch warnings
Fix checkpatch warnings.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:24:49 -07:00
K. Y. Srinivasan 1f46902371 Staging: hv: mousevsc: Fix a checkpatch warning
Fix a checkpatch warning.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:24:48 -07:00
Paul Bolle 40d1bac4ad staging: drop unused Kconfig symbols
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:24:48 -07:00
Seth Jennings 00bf256011 staging: zcache: remove zcache_direct_reclaim_lock
zcache_do_preload() currently does a spin_trylock() on the
zcache_direct_reclaim_lock. Holding this lock intends to prevent
shrink_zcache_memory() from evicting zbud pages as a result
of a preload.

However, it also prevents two threads from
executing zcache_do_preload() at the same time.  The first
thread will obtain the lock and the second thread's spin_trylock()
will fail (an aborted preload) causing the page to be either lost
(cleancache) or pushed out to the swap device (frontswap). It
also doesn't ensure that the call to shrink_zcache_memory() is
on the same thread as the call to zcache_do_preload().

Additional, there is no need for this mechanism because all
zcache_do_preload() calls that come down from cleancache already
have PF_MEMALLOC set in the process flags which prevents
direct reclaim in the memory manager. If the zcache_do_preload()
call is done from the frontswap path, we _want_ reclaim to be
done (which it isn't right now).

This patch removes the zcache_direct_reclaim_lock and related
statistics in zcache.

Based on v3.1-rc8

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Reviewed-by: Dave Hansen <dave@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:24:11 -07:00
Marc Dietrich 3b769edd58 staging/nvec: fix compilation error in nvec.c
This fixes a compilation error in nvec.c due to the missing module.h include.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Cc: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:24:11 -07:00
Tomas Winkler b55e073e95 staging/easycap: kill timeval members of easycap struct
timeval[0-9] were not used or used in a ready only code
so we can remove them safely and so the code

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:24:10 -07:00
David Kilroy 729336b326 staging: wlags49_h2: Fixup SIOCSIWGENIE
Setting the key management scheme is done in SIOCSIWAUTH, so
no need to do anything in SIOCSIWGENIE.

Fix up function name.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:22:38 -07:00
David Kilroy 9ef023006d staging: wlags49_h2: Fixup IW_AUTH handling
Handle more cases in IW_AUTH.

Avoid reporting errors (invalid parameter) on operations that we
can't do anything with.

Return -EINPROGRESS from some operations to get wpa_supplicant to
batch and commit changes.

In other operations apply the changes immediately.

Avoid writing WEP keys from the commit handler when WEP is not
being used.

Accept WPA_VERSION_DISABLED, which is received from wpa_supplicant
during WEP.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:22:38 -07:00
David Kilroy 05df482e6e staging: wlags49_h2: Make key setting more reliable
Share logic between encodeext and encode, so that we can handle
subtle differences between them (implied set_tx), and clear the
appropriate keys if you attempt to switch straight from WPA to
WEP and vice versa.

Also reinstate the TX buffer flush, and ensure the key index is
written to the card little endian.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:22:38 -07:00
David Kilroy 68da105637 staging: wlags49_h2: Report WPA IE in scan results with IWEVGENIE
Report the IE using the appropriate event instead of a custom one.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:22:37 -07:00
David Kilroy 25b20463f3 staging: wlags49_h2: Remove useless IWE_STREAM_ADD_XXX defines
These macros don't map to anything different. Just remove them.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:22:37 -07:00
David Kilroy add54e5c8a staging: wlags49_h2: Enable WPA in the HCF
WPA has been disabled in the HCF layer. The firmware does
support it (it is used on other platforms). Enable it so
we can work through the issues.

Note that we also enable this for the HERMES 2.5 non-WARP
firmware cards.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:22:36 -07:00
David Kilroy 1ca616711c staging: wlags49_h2: Handle sysfs_create_group return correctly
The function returns 0 on success and non-zero on error. So
correctly record the status so it is freed appropriately.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:22:36 -07:00
Pelle Windestam 8122fa341d drivers: staging: rts_pstor fixed checkpatch warnings
Fixed the checkpatch warnings in rtsx.c/.h, mostly braces and spaces
before tabs issues. Also fixed warning about not using
DEFINE_PCI_DEVICE_TABLE(...) macro.

Signed-off-by: Pelle Windestam <pelle@windestam.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:17:17 -07:00
wwang b6fbd29c8b staging:rts_pstor:Fix SDIO issue
Fix a bug that SDIO and SD normal card would appear simultaneously if a SDIO card inserted.

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:17:17 -07:00
Jake Burton 963ff7740d Staging: comedi: fix brace coding style issue in ni_atmio.c
This is a patch to the ni_atmio.c file which fixes a brace and whitespace warning found by the checkpatch.pl tool

Signed-off-by: Jake Burton <jake5991@live.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:11:30 -07:00
Nasir Abed 0bdd2b6207 Staging: comedi: c6xdigio: fixed missing KERN_* in printk
Fixed missing KERN_* in printk statements.

Signed-off-by: Nasir Abed <nasirabed+kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17 15:11:30 -07:00
John W. Linville 41ebe9cde7 Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem 2011-10-17 15:05:26 -04:00
Florian Tobias Schandinat 07aaae44f5 Merge commit 'v3.1-rc9' into fbdev-next 2011-10-15 00:14:01 +00:00
Aaro Koskinen 289ea5249c staging: xgifb: clean up 2nd display state
Convert the display type to enum and rename disp_state to display2.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:49 -06:00
Aaro Koskinen 3261f2a171 staging: xgifb: delete CRT1 state
The driver does not need to manage CRT1 state.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:49 -06:00
Aaro Koskinen 624554dae3 staging: xgifb: make DAC tables const
DAC tables are read-only and can be made const.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:49 -06:00
Aaro Koskinen 4397c7f03b staging: xgifb: make RAM type tables const
RAM type tables are read-only and can be made const.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:49 -06:00
Aaro Koskinen 2f0f395ef7 staging: xgifb: move XGINew_DataBusWidth into vb_device_info
Move the memory bus width info to vb_device_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:48 -06:00
Aaro Koskinen ee055a48ce staging: xgifb: move XGINew_ChannelAB into vb_device_info
Move the memory channel info into vb_device_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:48 -06:00
Aaro Koskinen 2af1a29da7 staging: xgifb: move XGINew_RAMType into vb_device_info
The RAM type is device specific, so move it into vb_device_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:48 -06:00
Aaro Koskinen f2df8c097a staging: xgifb: eliminate global XGI_Pr data
Move vb_device_info into xgifb_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:48 -06:00
Aaro Koskinen 7d2ab0c62d staging: xgifb: make XGIbios_mode const
Comments are wrong, the table is read-only and can be made const.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:47 -06:00
Aaro Koskinen 84a6c46eb2 staging: xgifb: eliminate filter_tb global variable
filter_tb is only used inside a single function, and it does not need
to be static.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:47 -06:00
Aaro Koskinen c11d0ef3e2 staging: xgifb: eliminate XGIfb_fix
Eliminate XGIfb_fix and initialize needed fields of fb_info->fix
in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:47 -06:00
Aaro Koskinen e9865d47d4 staging: xgifb: eliminate default_var
Eliminate default_var and initialize needed fields of fb_info->var
in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:47 -06:00
Aaro Koskinen 39f10bf18c staging: xgifb: eliminate XGIfb_CRT2_write_enable variable
Replace XGIfb_CRT2_write_enable with IND_XGI_CRT2_WRITE_ENABLE_315.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:47 -06:00
Aaro Koskinen 76cabaa428 staging: xgifb: move pseudo_palette into xgifb_video_info
pseudo_palette should be dynamically allocated for each fb.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:46 -06:00
Aaro Koskinen 5aa55d9f97 staging: xgifb: move XGIfb_rate_idx into xgifb_video_info
The current refresh rate index should be stored in the device-specific
data allocated in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:46 -06:00
Aaro Koskinen ccf265ad57 staging: xgifb: move xgifb_mode_idx into xgifb_video_info
The current mode index should be stored in the device-specific data
allocated in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:46 -06:00
Aaro Koskinen 6928c18ee5 staging: xgifb: eliminate XGIfb_mode_no
We can get the information from the table with mode index.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:46 -06:00
Aaro Koskinen fcbdda90ef staging: xgifb: dynamically allocate xgifb_video_info
Delete global xgi_video_info and dynamically allocate the data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:45 -06:00
Aaro Koskinen fd26d42019 staging: xgifb: avoid direct references xgi_video_info
Avoid direct references to global xgi_video_info. This will help changing
the data from statically allocated to dynamically allocated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:45 -06:00
Aaro Koskinen ab886ff86d staging: xgifb: rename struct video_info to xgifb_video_info
Rename struct video_info to xgifb_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:45 -06:00
Aaro Koskinen 7548a83e5f staging: xgifb: add a global variable for the default refresh rate
Add a global variable for the default refresh rate. This is done to
get rid of references to xgi_video_info before the probe routine, which
should allocate the xgi_video_info dynamically in the future.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:45 -06:00
Aaro Koskinen 6048d761d2 staging: xgifb: inline XGIfb_query_VGA_config_space()
XGIfb_query_VGA_config_space() is used only once during the init and
can be replaced with a single PCI configuration space read.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:45 -06:00
Aaro Koskinen c62f2e466f staging: xgifb: eliminate global XGIhw_ext data
Move xgi_hw_device_info into xgi_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:44 -06:00
Aaro Koskinen 19c1e88e02 staging: xgifb: eliminate global fb_info variable
Move fb_info into xgi_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:44 -06:00
Aaro Koskinen 54301b5cfe staging: xgifb: use PCI drvdata
Don't access the global xgi_video_info directly in xgifb_remove().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:44 -06:00
Seth Jennings 3d65c85f91 staging: zcache: reduce tmem bucket lock contention
tmem uses hash buckets each with their own rbtree and lock to
quickly lookup tmem objects.  tmem has TMEM_HASH_BUCKETS (256)
buckets per pool.  However, because of the way the tmem_oid is
generated for frontswap pages, only 16 unique tmem_oids are being
generated, resulting in only 16 of the 256 buckets being used.
This cause high lock contention for the per bucket locks.

This patch changes SWIZ_BITS to include more bits of the offset.
The result is that all 256 hash buckets are potentially used resulting in a
95% drop in hash bucket lock contention.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:29:03 -06:00
Arend van Spriel fc2d6e573b staging: brcm80211: remove brcm80211 driver from the staging tree
With the mainline patch being applied to the wireless-next repository
by John Linville this driver is no longer needed under the staging
directory. This patch ends its life under the staging tree.

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:21:18 -06:00
Arend van Spriel 5b435de0d7 net: wireless: add brcm80211 drivers
Add the brcm80211 tree to drivers/net/wireless, and disable the version that's
in drivers/staging.  This version includes the sources currently in staging,
plus any changes that have been sent out for review.

Sources in staging will be deleted in a followup patch.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 15:55:30 -04:00
John W. Linville 094daf7db7 Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Conflicts:
	Documentation/feature-removal-schedule.txt
2011-10-11 15:35:42 -04:00
Kevin McKinney 54ced00639 Staging: bcm: Fix coding style issues in InterfaceMisc.c
This patch cleans up several code style issues found
in InterfaceMisc.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:58 -06:00
Kevin McKinney ca45e70029 Staging: bcm: Remove assignment from if conditions reported by checkpatch.pl
This patch removes an assignment from three if
conditions.  In all three cases, the line of code was
attempting to allocate memory, and check
if the memory was allocated in the if statement.
This issue was reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:57 -06:00
Kevin McKinney f969f84ed9 Staging: bcm: Fix coding style issues reported by checkpatch.pl
This patch cleans up several code style issues found
in InterfaceInit.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:57 -06:00
Kevin McKinney d491061b98 Staging: bcm: Fix assignment issue in if statement reported by checkpatch.pl.
This patch fixes an error where an assignment "="
was being used in an if statement to determine if
Firmware was downloaded. This patch removes that
assignment, and places it above the if statement.
The if statement then evaluates the status to
verify if "0" successful, or != 0 failure.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:21 -06:00
Kevin McKinney 9d4f1d0c9d Staging: bcm: Remove assignment in if condition reported by checkpatch.pl
There is a case where an assignment was being done
in an if condition. This patch removes the assignment
from the if condition and places the assignment above
the if statement; thereby improving the readability of
the code.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:21 -06:00
Kevin McKinney a8a1cdd6d4 Staging: bcm: Replace dated variable __FUNCTION__ reported by checkpatch.pl
This patch replaces the obsolete variable, __FUNCTION__, that
holds the name of the current function with variable, __func__.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:21 -06:00
Kevin McKinney 6a4ef5f9b3 Staging: bcm: Fix coding style issues reported by checkpatch.pl
This patch cleans up several hundred code style issues found
in Misc.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:20 -06:00
Mark Einon a098582101 staging: et131x: Update TODO list
Added some more tasks to the TODO list, as highlighted by Francois
Romieu <romieu@fr.zoreil.com>.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:10:30 -06:00
Mark Einon a7203d58cb staging: et131x: Remove unused mac defines
Remove some unused defines from et1310_mac.c.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:10:30 -06:00
Mark Einon 33fd472ee7 staging: et131x: Fix et131x smatch issues
This fixes the following issues:

et131x_initpci.c +488 et131x_adjust_link(45) error: we previously assumed 'phydev' could be null.
et131x_initpci.c +504 et131x_adjust_link(61) warn: variable dereferenced before check 'phydev'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:10:30 -06:00
Mark Einon 6617c36987 staging: et131x: Fix et131x sparse warnings
This fixes the following warnings:

et1310_mac.c:375:44: warning: incorrect type in initializer (different address spaces)
et1310_mac.c:382:28: warning: incorrect type in argument 2 (different address spaces)
et1310_mac.c:384:31: warning: incorrect type in argument 2 (different address spaces)
et131x_initpci.c:555:5: warning: symbol 'et131x_mii_probe' was not declared. Should it be static?
et131x_netdev.c:267:5: warning: symbol 'et131x_ioctl' was not declared. Should it be static?
et131x_netdev.c:285:5: warning: symbol 'et131x_set_packet_filter' was not declared. Should it be static?
et131x_netdev.c:347:6: warning: symbol 'et131x_multicast' was not declared. Should it be static?
et131x_netdev.c:420:5: warning: symbol 'et131x_tx' was not declared. Should it be static?
et131x_netdev.c:453:6: warning: symbol 'et131x_tx_timeout' was not declared. Should it be static?
et131x_netdev.c:511:5: warning: symbol 'et131x_change_mtu' was not declared. Should it be static?
et131x_netdev.c:564:5: warning: symbol 'et131x_set_mac_addr' was not declared. Should it be static?

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:10:29 -06:00