H Hartley Sweeten [Wed, 19 Sep 2012 22:09:07 +0000 (15:09 -0700)]
staging: comedi: s526: remove ADDR_REG macro
This macro relies on a local variable having a specific name.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 22:08:52 +0000 (15:08 -0700)]
staging: comedi: s526: remove devpriv macro
This macro relies on a local variable having a specific name.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 22:08:35 +0000 (15:08 -0700)]
staging: comedi: s526: don't dereference insn->data pointer
The comedi_insn 'data' pointer is a __user pointer that is
passed into the kernel using an ioctl. The comedi core copies
this data to kernel space in do_insnlist_ioctl() and then
passes that kernel data to the drivers as a separate parameter.
The drivers never need to access the data through the insn->data
pointer.
This fixes a number of sparse warnings about:
warning: dereference of noderef expression
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sascha Hauer [Fri, 21 Sep 2012 08:07:52 +0000 (10:07 +0200)]
staging: drm/imx: Add TODO
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Zabel [Fri, 21 Sep 2012 08:07:51 +0000 (10:07 +0200)]
staging: drm/imx: Add devicetree binding documentation
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sascha Hauer [Fri, 21 Sep 2012 08:07:50 +0000 (10:07 +0200)]
staging: drm/imx: Add i.MX IPUv3 crtc support
This adds a i.MX51/53/6 IPU (Image Processing Unit) KMS driver. The
driver has been tested on the i.MX51 babbage board, the i.MX53 LOCO
board and the i.MX6q sabrelite board in different clone mode and dual
head setups.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sascha Hauer [Fri, 21 Sep 2012 08:07:49 +0000 (10:07 +0200)]
staging: drm/imx: add i.MX IPUv3 base driver
The IPU is the Image Processing Unit found on i.MX51/53/6 SoCs. It
features several units for image processing, this patch adds support
for the units needed for Framebuffer support, namely:
- Display Controller (dc)
- Display Interface (di)
- Display Multi Fifo Controller (dmfc)
- Display Processor (dp)
- Image DMA Controller (idmac)
This patch is based on the Freescale driver, but follows a different
approach. The Freescale code implements logical idmac channels and
the handling of the subunits is hidden in common idmac code pathes
in big switch/case statements. This patch instead just provides code
and resource management for the different subunits. The user, in this
case the framebuffer driver, decides how the different units play
together.
The IPU has other units missing in this patch:
- CMOS Sensor Interface (csi)
- Video Deinterlacer (vdi)
- Sensor Multi FIFO Controler (smfc)
- Image Converter (ic)
- Image Rotator (irt)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sascha Hauer [Fri, 21 Sep 2012 08:07:48 +0000 (10:07 +0200)]
staging: drm/imx: Add parallel display support
This adds support for parallel displays for i.MX. It consists
of a drm encoder/connector pair which eventually passes EDID
data from the devicetree to the drm core.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sascha Hauer [Fri, 21 Sep 2012 08:07:47 +0000 (10:07 +0200)]
staging: drm/imx: Add i.MX drm core support
This patch adds the i.MX glue stuff between i.MX and drm.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Fri, 21 Sep 2012 02:43:44 +0000 (22:43 -0400)]
Staging: bcm: Remove typedef for _stIM_sfHostNotify and call directly.
This patch removes typedef for _stIM_sfHostNotify,
changes the name of the struct from
_stIM_sfHostNotify to bcm_stim_sfhostnotify.
In addition, any calls to the following typedef
"stIM_sfHostNotify" are changed to call the
struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Fri, 21 Sep 2012 06:00:04 +0000 (14:00 +0800)]
staging: tidspbridge: fix return value check in dsp_wdt_init()
In case of error, the function clk_get() returns ERR_PTR()
and never returns NULL pointer. The NULL test in the error
handling should be replaced with IS_ERR().
dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Wed, 19 Sep 2012 09:16:08 +0000 (05:16 -0400)]
staging: sbe-2t3e3: use -ve error return codes in dc_init_descriptor_list
the dc_init_descriptor_list actually returns a +ve error return codes,
which is abnormal as other functions in kernel return -ve error codes on
failure. so replace the return codes of this function with -ve values
to make the consistency with the other functions in kernel.
Also make the dc_init_descriptor_list static as its never called
anywhere except in this file and move the function prototype from the
headerfile into the c file as its referred only in this c file.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Thu, 20 Sep 2012 16:10:57 +0000 (12:10 -0400)]
staging:
ced1401: remove read write callbacks from fops
As the driver says that read and writes should not be performed
and instead the user to kernel transactions are performed through
ioctl interface, remove these functions as they are not required
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Thu, 20 Sep 2012 16:06:35 +0000 (12:06 -0400)]
staging:
ced1401: use module_usb_driver macro
the module init and exit functions that are
doing usb_register and usb_deregister respectively can be
replaced with module_usb_driver code
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
YAMANE Toshiaki [Thu, 20 Sep 2012 11:58:20 +0000 (20:58 +0900)]
staging/rts_pstor: Delete some lines (dev_info() and dev_err()) in rtsx.c
fixed some coccinelle warnings.
+ drivers/staging/rts_pstor/rtsx.c:397:16-19: ERROR: dev is NULL but dereferenced.
drivers/staging/rts_pstor/rtsx.c:447:16-19: ERROR: dev is NULL but dereferenced.
drivers/staging/rts_pstor/rtsx.c:358:16-19: ERROR: dev is NULL but dereferenced.
Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Thu, 20 Sep 2012 08:43:54 +0000 (11:43 +0300)]
Staging:
ced1401: fix a couple off by one checks
nArea is used as an offset into the ->rTransDef[] array which has
MAX_TRANSAREAS elements.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Adam Buchbinder [Thu, 20 Sep 2012 01:51:08 +0000 (21:51 -0400)]
staging: Fix spelling of "asynchronous" in comments.
"Asychronous" is misspelled in some comments. No code changes.
Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Adam Buchbinder [Thu, 20 Sep 2012 01:51:07 +0000 (21:51 -0400)]
staging: Fix misspellings of "whether".
"Whether" is spelled "wether" in several places. This fixes those that
are in the staging tree.
Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Randy Dunlap [Wed, 19 Sep 2012 17:58:28 +0000 (10:58 -0700)]
staging: fix silicom dependencies and build errors
Fix kconfig dependencies in silicom. Fixes these build errors:
ERROR: "init_net" [drivers/staging/silicom/bypasslib/bypass.ko] undefined!
ERROR: "register_netdevice_notifier" [drivers/staging/silicom/bpctl_mod.ko] undefined!
ERROR: "unregister_netdevice_notifier" [drivers/staging/silicom/bpctl_mod.ko] undefined!
ERROR: "init_net" [drivers/staging/silicom/bpctl_mod.ko] undefined!
ERROR: "netdev_info" [drivers/net/mii.ko] undefined!
ERROR: "netif_carrier_on" [drivers/net/mii.ko] undefined!
ERROR: "netif_carrier_off" [drivers/net/mii.ko] undefined!
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Radhesh Fadnis [Wed, 19 Sep 2012 17:07:49 +0000 (20:07 +0300)]
staging: omap-thermal: bandgap: fix setting of alert thresholds
There was an error in check for the valid temperature in
function temp_to_adc_conversion. The temperature value was
compared with higher limit for less than condition as well,
resulting in returning -EINVAL. Corrected the check condition
to properly check for lower and higher temperature limits.
Signed-off-by: Radhesh Fadnis <radhesh.fadnis@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin [Wed, 19 Sep 2012 11:34:51 +0000 (17:04 +0530)]
staging: usbip: vhci_hcd: Fixed oops during removal of vhci_hcd
In response to "usbip detach -p [port_number]" user command,vhci_shutdown_connection() gets
executed which kills tcp_tx,tcp_rx kernel threads but doesn't set thread pointers to NULL.
so, at the time of vhci_hcd removal vhci_shutdown_connection() again tries to kill kernel
threads which are already killed.
[ 312.220259] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 312.220313] IP: [<
ffffffff8108186f>] exit_creds+0x1f/0x70
[ 312.220349] PGD
5b7be067 PUD
5b7dc067 PMD 0
[ 312.220388] Oops: 0000 [#1] SMP
[ 312.220415] Modules linked in: vhci_hcd(O-) usbip_host(O) usbip_core(O) uas usb_storage joydev parport_pc bnep rfcomm ppdev binfmt_misc
snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi arc4 snd_rawmidi snd_seq_midi_event snd_seq
ath9k mac80211 ath9k_common ath9k_hw snd_timer snd_seq_device snd ath i915 drm_kms_helper drm psmouse cfg80211 coretemp soundcore lpc_ich i2c_algo_bit
snd_page_alloc video intel_ips wmi btusb mac_hid bluetooth ideapad_laptop lp sparse_keymap serio_raw mei microcode parport r8169
[ 312.220862] CPU 0
[ 312.220882] Pid: 2095, comm: usbip_eh Tainted: G O 3.6.0-rc3+ #2 LENOVO 20042 /Base Board Product Name
[ 312.220938] RIP: 0010:[<
ffffffff8108186f>] [<
ffffffff8108186f>] exit_creds+0x1f/0x70
[ 312.220979] RSP: 0018:
ffff88004d6ebdb0 EFLAGS:
00010282
[ 312.221008] RAX:
0000000000000000 RBX:
ffff880041c4db40 RCX:
ffff88005ad52230
[ 312.221041] RDX:
0000000000000034 RSI:
0000000000000286 RDI:
0000000000000000
[ 312.221074] RBP:
ffff88004d6ebdc0 R08:
ffff88004d6ea000 R09:
0000000000000000
[ 312.221107] R10:
0000000000000001 R11:
0000000000000000 R12:
0000000000000000
[ 312.221144] R13:
0000000000000000 R14:
ffff88005ad521d8 R15:
ffff88004d6ebea0
[ 312.221177] FS:
0000000000000000(0000) GS:
ffff880077400000(0000) knlGS:
0000000000000000
[ 312.221214] CS: 0010 DS: 0000 ES: 0000 CR0:
000000008005003b
[ 312.221241] CR2:
0000000000000000 CR3:
000000005b7b9000 CR4:
00000000000007f0
[ 312.221277] DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
[ 312.221309] DR3:
0000000000000000 DR6:
00000000ffff0ff0 DR7:
0000000000000400
[ 312.221342] Process usbip_eh (pid: 2095, threadinfo
ffff88004d6ea000, task
ffff88004d44db40)
[ 312.221384] Stack:
[ 312.221396]
ffff88004d6ebdc0 ffff880041c4db40 ffff88004d6ebde0 ffffffff81052aaa
[ 312.221442]
ffff880041c4db40 0000000000000000 ffff88004d6ebe10 ffffffff8107a148
[ 312.221487]
ffff88005ad521f0 ffff88005ad52228 ffff88004d44db40 ffff88005ad521d8
[ 312.221536] Call Trace:
[ 312.221556] [<
ffffffff81052aaa>] __put_task_struct+0x4a/0x140
[ 312.221587] [<
ffffffff8107a148>] kthread_stop+0x108/0x110
[ 312.221616] [<
ffffffffa0412569>] vhci_shutdown_connection+0x49/0x2b4 [vhci_hcd]
[ 312.221657] [<
ffffffffa0139920>] event_handler_loop+0x70/0x140 [usbip_core]
[ 312.221692] [<
ffffffff8107ad30>] ? add_wait_queue+0x60/0x60
[ 312.221721] [<
ffffffffa01398b0>] ? usbip_stop_eh+0x30/0x30 [usbip_core]
[ 312.221754] [<
ffffffff8107a453>] kthread+0x93/0xa0
[ 312.221784] [<
ffffffff81670e84>] kernel_thread_helper+0x4/0x10
[ 312.221814] [<
ffffffff8107a3c0>] ? flush_kthread_worker+0xb0/0xb0
[ 312.223589] [<
ffffffff81670e80>] ? gs_change+0x13/0x13
[ 312.225360] Code: 0b 0f 0b 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 48 8b 87 58 04 00 00 48 89 fb 48 8b bf 50 04 00 00
<8b> 00 48 c7 83 50 04 00 00 00 00 00 00 f0 ff 0f 0f 94 c0 84 c0
[ 312.229663] RIP [<
ffffffff8108186f>] exit_creds+0x1f/0x70
[ 312.231696] RSP <
ffff88004d6ebdb0>
[ 312.233648] CR2:
0000000000000000
[ 312.256464] ---[ end trace
1971ce612a167279 ]---
Signed-off-by: navin patidar <navinp@cdac.in>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin [Wed, 19 Sep 2012 11:37:27 +0000 (17:07 +0530)]
staging: usbip: stub_dev: Fixed oops during removal of usbip_host
stub_shutdown_connection() should set kernel thread pointers to NULL after killing them.
so that at the time of usbip_host removal stub_shutdown_connection() doesn't try to kill kernel threads
which are already killed.
[ 1504.312158] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 1504.315833] IP: [<
ffffffff8108186f>] exit_creds+0x1f/0x70
[ 1504.317688] PGD
41f1c067 PUD
41d0f067 PMD 0
[ 1504.319611] Oops: 0000 [#2] SMP
[ 1504.321480] Modules linked in: vhci_hcd(O) usbip_host(O-) usbip_core(O) uas usb_storage joydev parport_pc bnep rfcomm ppdev binfmt_misc
snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi arc4 snd_rawmidi snd_seq_midi_event
snd_seq ath9k mac80211 ath9k_common ath9k_hw snd_timer snd_seq_device snd ath i915 drm_kms_helper drm psmouse cfg80211 coretemp soundcore
lpc_ich i2c_algo_bit snd_page_alloc video intel_ips wmi btusb mac_hid bluetooth ideapad_laptop lp sparse_keymap serio_raw mei microcode parport r8169
[ 1504.329666] CPU 1
[ 1504.329687] Pid: 2434, comm: usbip_eh Tainted: G D O 3.6.0-rc31+ #2 LENOVO 20042 /Base Board Product Name
[ 1504.333502] RIP: 0010:[<
ffffffff8108186f>] [<
ffffffff8108186f>] exit_creds+0x1f/0x70
[ 1504.335371] RSP: 0018:
ffff880041c7fdd0 EFLAGS:
00010282
[ 1504.337226] RAX:
0000000000000000 RBX:
ffff880041c2db40 RCX:
ffff880041e4ae50
[ 1504.339101] RDX:
0000000000000044 RSI:
0000000000000286 RDI:
0000000000000000
[ 1504.341027] RBP:
ffff880041c7fde0 R08:
ffff880041c7e000 R09:
0000000000000000
[ 1504.342934] R10:
0000000000000001 R11:
0000000000000000 R12:
0000000000000000
[ 1504.344840] R13:
0000000000000000 R14:
ffff88004d448000 R15:
ffff880041c7fea0
[ 1504.346743] FS:
0000000000000000(0000) GS:
ffff880077440000(0000) knlGS:
0000000000000000
[ 1504.348671] CS: 0010 DS: 0000 ES: 0000 CR0:
000000008005003b
[ 1504.350612] CR2:
0000000000000000 CR3:
0000000041d0d000 CR4:
00000000000007e0
[ 1504.352723] DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
[ 1504.354734] DR3:
0000000000000000 DR6:
00000000ffff0ff0 DR7:
0000000000000400
[ 1504.356737] Process usbip_eh (pid: 2434, threadinfo
ffff880041c7e000, task
ffff88004d448000)
[ 1504.358711] Stack:
[ 1504.360635]
ffff880041c7fde0 ffff880041c2db40 ffff880041c7fe00 ffffffff81052aaa
[ 1504.362589]
ffff880041c2db40 0000000000000000 ffff880041c7fe30 ffffffff8107a148
[ 1504.364539]
ffff880041e4ae10 ffff880041e4ae00 ffff88004d448000 ffff88004d448000
[ 1504.366470] Call Trace:
[ 1504.368368] [<
ffffffff81052aaa>] __put_task_struct+0x4a/0x140
[ 1504.370307] [<
ffffffff8107a148>] kthread_stop+0x108/0x110
[ 1504.370312] [<
ffffffffa040da4e>] stub_shutdown_connection+0x3e/0x1b0 [usbip_host]
[ 1504.370315] [<
ffffffffa03fd920>] event_handler_loop+0x70/0x140 [usbip_core]
[ 1504.370318] [<
ffffffff8107ad30>] ? add_wait_queue+0x60/0x60
[ 1504.370320] [<
ffffffffa03fd8b0>] ? usbip_stop_eh+0x30/0x30 [usbip_core]
[ 1504.370322] [<
ffffffff8107a453>] kthread+0x93/0xa0
[ 1504.370327] [<
ffffffff81670e84>] kernel_thread_helper+0x4/0x10
[ 1504.370330] [<
ffffffff8107a3c0>] ? flush_kthread_worker+0xb0/0xb0
[ 1504.370332] [<
ffffffff81670e80>] ? gs_change+0x13/0x13
[ 1504.370351] Code: 0b 0f 0b 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 48 8b 87 58 04 00 00 48 89 fb 48 8b bf 50 04 00 00
<8b> 00 48 c7 83 50 04 00 00 00 00 00 00 f0 ff 0f 0f 94 c0 84 c0
[ 1504.370353] RIP [<
ffffffff8108186f>] exit_creds+0x1f/0x70
[ 1504.370353] RSP <
ffff880041c7fdd0>
[ 1504.370354] CR2:
0000000000000000
[ 1504.401376] ---[ end trace
1971ce612a16727a ]---
Signed-off-by: navin patidar <navinp@cdac.in>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 18 Sep 2012 18:46:58 +0000 (19:46 +0100)]
staging: comedi: don't dereference user memory for INSN_INTTRIG
`parse_insn()` is dereferencing the user-space pointer `insn->data`
directly when handling the `INSN_INTTRIG` comedi instruction. It
shouldn't be using `insn->data` at all; it should be using the separate
`data` pointer passed to the function. Fix it.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 18 Sep 2012 18:46:59 +0000 (19:46 +0100)]
staging: comedi: sparse warning in insn_rw_emulate_bits()
`insn_rw_emulate_bits()` is used to emulate the `INSN_READ` and
`INSN_WRITE` comedi instructions for subdevices that don't have an
`insn_read()` or `insn_write()` handler but do have an `insn_bits()`
handler.
The function fills in a temporary `struct comedi_insn` called `new_insn`
to pass to the subdevice's `insn_bits()` handler. In doing so, it sets
the `new_insn.data` pointer to point to a temporary data array. This
results in a warning from "sparse" because the `data` pointer in `struct
comedi_insn` has the `__user` tag. The subdevice's `insn_bits()`
handler ignores it anyway as it gets passed a pointer to the temporary
data array in a separate parameter. Don't bother setting
`new_insn.data`; just leave it set to `NULL` (done by an earlier
`memset()`).
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 18 Sep 2012 18:46:57 +0000 (19:46 +0100)]
staging: comedi: fix sparse warning in do_devconfig_ioctl()
For the COMEDI_DEVCONFIG ioctl, the user application may embed a pointer
to firmware data within a designated element (or two elements for 64-bit
pointers) of the `options[]` array in the `struct comedi_devconfig`.
`do_devconfig_ioctl()` calls `comedi_aux_data()` to extract the pointer
value. It needs to be treated as a `__user` pointer so the firmware
data can be copied into kernel memory, so cast the result of
`comedi_aux_data()` to avoid a "sparse" warning. This is not ideal but
`comedi_aux_data()` is called elsewhere in a wholly kernel memory
context so we can't just change its return type to include the `__user`
tag.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:50:23 +0000 (18:50 -0700)]
staging: comedi: daqboard2000: remove local variable in daqboard2000_attach_pci()
The 'pci_base' variable is only used to hold the pci_resource_start()
value used to ioremap the pci bars. Remove the local variable and just
use pci_resource_start() directly in the ioremap.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:50:05 +0000 (18:50 -0700)]
staging: comedi: daqboard2000: use the pci_resource_len()
Use pci_resource_len() when doing the ioremap instead of assuming
the resource size.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:49:46 +0000 (18:49 -0700)]
staging: comedi: daqboard2000: add a dev_info message after attach
After a successful attach, output a simple dev_info message.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:49:28 +0000 (18:49 -0700)]
staging: comedi: daqboard2000: use the driver name for the resource name
Use the dev->driver->driver_name instead of the literal string
for the reqource name passed to comedi_pci_enable().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:49:09 +0000 (18:49 -0700)]
staging: comedi: daqboard2000: remove the "test command" comment
This driver no longer uses comedi_config to attach so this comment
does not apply.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:48:50 +0000 (18:48 -0700)]
staging: comedi: daqboard2000: remove the dev_printk function trace
These kernel messages are just noise and should be removed in
the final driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:48:32 +0000 (18:48 -0700)]
staging: comedi: daqboard2000: remove DEBUG_EEPROM messages
DEBUG_EEPROM is not defined anywhere and these messages are just
noise. Remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:48:16 +0000 (18:48 -0700)]
staging: comedi: daqboard2000: remove the commented out debug messages
They are commented out and are are just noise anyway.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:47:53 +0000 (18:47 -0700)]
staging: comedi: daqboard2000: cleanup range_daqboard2000_ai
Change the whitespace of the range table to avoid the > 80 char
lines and the ugly line breaks. Convert the RANGE() values into
the appropriate {BIP,UNI}_RANGE().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:47:34 +0000 (18:47 -0700)]
staging: comedi: daqboard2000: remove range_daqboard2000_ao
This comedi_lrange is the same as the global range_bipolar10
exported by the comedi core. Use that range instead.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:47:15 +0000 (18:47 -0700)]
staging: comedi: daqboard2000: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options. and
the legacy 'attach' callback is now optional, remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:46:57 +0000 (18:46 -0700)]
staging: comedi: daqboard2000: use request_firmware()
This driver requires loading a firmware file for the cpld. This
is currently being done by passing the firmware data using the
COMEDI_DEVCONFIG ioctl through the attach() hook in the driver.
This does not work for auto-configured PCI devices due to the
firmware loading options not being set in the comedi_devconfig
parameter passed to the driver.
Change the driver so it gets the firmware using request_firmware()
and ignore any firmware options passed in the comedi_devconfig.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:46:41 +0000 (18:46 -0700)]
staging: comedi: daqboard2000: remove this_board and devpriv macros
These macros rely on a local variable having a specific name.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 19 Sep 2012 01:46:23 +0000 (18:46 -0700)]
staging: comedi: daqboard2000: remove struct daqboard2000_hw
In this driver the PCI bar 2 resource is being ioremap'ed to a
void * in the private data. This void * is then being cast to a
struct daqboard2000_hw * that defines all the registers used by
the driver.
This is causing a number of sparse warnings similar to:
warning: incorrect type in argument 1 (different address space)
expected void const volatile [noderef] <asn:2>*addr
got void *
Change the type in the private data to void __iomem * to correctly
store the ioremap'ed address.
Remove struct daqboard2000_hw and change the contents to #define's
for the register memory map.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 18 Sep 2012 18:43:52 +0000 (11:43 -0700)]
staging: comedi: comedi_fops: cast the cmd->chanlist to the correct address space
Rename 'chanlist_saver' to 'user_chanlist' to avoid confusion that
it's actually a __user *.
The chanlist pointer in comedi_cmd is still a user space pointer when
the comedi_cmd is copied with copy_from_user() in do_cmd_ioctl() and
do_cmdtest_ioctl(). This pointer needs to be cast when it is saved in
user_chanlist in order to preserve its address space.
The copy_from_user() call to copy the chanlist to the kernel space
comedi_command requires the second parameter to be a __user pointer.
Use the correctly cast user_chanlist instead of cmd->chanlist.
Before the comedi_cmd is copied back to user space, the saved
user_chanlist pointer is restored. Cast the user_chanlist again so
that the address space matches the comedi_cmd.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 18 Sep 2012 18:43:13 +0000 (11:43 -0700)]
staging: comedi: comedi_fops: rename user_cmd in do_cmdtest_ioctl
This local variable is used to hold the comedi_cmd that is passed
to the kernel as the argument to the COMEDI_CMDTEST ioctl. Its filled
in with a copy_from_user() call. The name 'user_cmd' is a bit
confusing since it's actually kernel data.
Rename the local variable to 'cmd' to avoid the confusion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 18 Sep 2012 18:42:37 +0000 (11:42 -0700)]
staging: comedi: comedi_fops: rename user_cmd in do_cmd_ioctl
This local variable is used to hold the comedi_cmd that is passed
to the kernel as the argument to the COMEDI_CMD ioctl. Its filled
in with a copy_from_user() call. The name 'user_cmd' is a bit
confusing since it's actually kernel data.
Rename the local variable to 'cmd' to avoid the confusion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 18 Sep 2012 18:41:54 +0000 (11:41 -0700)]
staging: comedi: comedi_fops: rename the __user *cmd param in do_cmd_ioctl
This parameter is actually the unsigned long arg passed in the ioctl.
comedi_unlocked_ioctl() casts it as a (struct comedi_cmd __user *)
when calling do_cmd_ioctl(). Rename the variable to keep this clear.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 18 Sep 2012 18:41:04 +0000 (11:41 -0700)]
staging: comedi: comedi.h: remove __user tag from chanlist
The 'chanlist' is passed to the kernel from user space with the
COMEDI_CMD and COMEDI_CMDTEST ioctls. The do_cmd_ioctl() and
do_cmdtest_ioctl() functions in comedi_fops.c copy this data
to/from user space to kernel space correctly.
Unfortunately, this data is copied back into a struct comedi_cmd
so when the cmd is passed down to the drivers they still see the
pointer as __user data. This results is a number of sparse errors
such as:
warning: dereference of noderef expression
warning: incorrect type in argument 2 (different address spaces)
expected void const *<noident>
got unsigned int [noderef] <asn:1>*chanlist
warning: incorrect type in argument 3 (different address spaces)
expected unsigned int *chanlist
got unsigned int [noderef] <asn:1>*chanlist
warning: incorrect type in assignment (different address spaces)
expected unsigned int *ai_chanlist
got unsigned int [noderef] <asn:1>*chanlist
The two functions in comedi_fops are the only ones that need the
__user tag. Remove the tag so that all the drivers see the chanlist
pointer in the correct address space.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 18 Sep 2012 18:40:15 +0000 (11:40 -0700)]
staging: comedi: comedi.h: remove the extra indents
The extra indents in this file cause git diff to not know the
section where changes are being made. This results in diff outputs
like:
@@ -365,7 +365,10 @@
instead of the more informational:
@@ -365,6 +365,7 @@ struct comedi_cmd {
Remove all the extra indents.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emil Goode [Tue, 18 Sep 2012 16:04:07 +0000 (18:04 +0200)]
staging: wlan-ng: Fix dereference before NULL check
Smatch is warning about a dereference before we check for NULL.
This patch moves the dereference to after the NULL check.
Smatch warning:
drivers/staging/wlan-ng/cfg80211.c:345 prism2_scan() warn:
variable dereferenced before check 'request' (see line 332)
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fengguang Wu [Wed, 19 Sep 2012 01:37:32 +0000 (09:37 +0800)]
staging: ozwpan: compare pointer to NULL rather than 0
Generated by: scripts/coccinelle/null/badzero.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Wed, 19 Sep 2012 01:37:46 +0000 (21:37 -0400)]
Staging: bcm: Properly format braces in cntrl_SignalingInterface.h
This patch cuddles braces as reported
by checkpatch.pl.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Wed, 19 Sep 2012 01:37:45 +0000 (21:37 -0400)]
Staging: bcm: Properly format comments in cntrl_SignalingInterface.h
This patch properly formats comments
as reported by checkpatch.pl.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Wed, 19 Sep 2012 01:37:44 +0000 (21:37 -0400)]
Staging: bcm: Fix all white space issues in cntrl_SignalingInterface.h
This patch fixes all white space issues
as reported by checkpatch.pl.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Cotey [Tue, 18 Sep 2012 11:47:59 +0000 (04:47 -0700)]
Staging: silicom: bp_mod.c: checkpatch cleanups: C99 comments
remove code or change to traditional comments
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Cotey [Tue, 18 Sep 2012 11:47:58 +0000 (04:47 -0700)]
Staging: silicom: bp_mod.c: checkpatch cleanup: fix returns
Fix up all the returns to cannonical form, and an ifdef removal
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 18 Sep 2012 06:02:36 +0000 (23:02 -0700)]
Staging: remove CONFIG_EXPERIMENTAL dependancies
As discussed at the kernel summit this year, CONFIG_EXPERIMENTAL means
nothing, so let's get rid of it.
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 18 Sep 2012 04:25:28 +0000 (21:25 -0700)]
Staging:
ced1401: fix copy_from/to_user warning messages
Properly check the return value of copy_from/to_user() and handle any
errors that might happen.
This removes a bunch of compiler warnings.
Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 18 Sep 2012 04:12:59 +0000 (21:12 -0700)]
Staging
ced1401: cleanup coding style issues.
A basic Lindent run on the .c files, clean up the .h file by hand.
Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 18 Sep 2012 02:43:33 +0000 (19:43 -0700)]
Staging:
ced1401: add driver to the build
This adds the
ced1401 driver to the build system.
Yes, there are a lot of warning messages, but it does compile, so it
should be good to get going.
Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 18 Sep 2012 02:42:05 +0000 (19:42 -0700)]
Staging:
ced1401: add TODO file
This adds a first cut of a TODO file to get this driver out of the
staging directory.
Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 18 Sep 2012 02:36:03 +0000 (19:36 -0700)]
Staging:
ced1401: usb1401: fix build errors.
This fixes up the usb1401.c file to remove the usage of err() (which is
gone), and the two-argument kmap_atomic() call, and the compat_ioctl
pointer warning.
The code now builds properly, there are lots of warnings still, but it's
a start.
Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alois Schlögl [Tue, 18 Sep 2012 02:22:52 +0000 (19:22 -0700)]
Staging: add
ced1401 USB driver
This was imported from the
http://pub.ist.ac.at/~schloegl/src/
ced1401/.git git repo at the request
of Alois. The driver originally came from Cambridge Electronic Design
Ltd and was authored by Greg P Smith and others, but Alois did the
maintance work to get it into a semi-building state and pushed to get it
into the main kernel tree here.
Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:17:19 +0000 (13:17 -0700)]
staging: comedi: jr3_pci: quiet "Using plain interger as NULL pointer" noise
Quiet some sparse warnings about:
warning: Using plain integer as NULL pointer
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:17:03 +0000 (13:17 -0700)]
staging: comedi: pcmuio: pointers should be cleared with NULL
Pointer variables should be cleared with NULL on 0. This quiets
some sparse warnings about:
warning: Using plain integer as NULL pointer
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:16:45 +0000 (13:16 -0700)]
staging: comedi: pcmmio: remove kernel messages about IRQ
These messages are just added noise.
They also cause some sparse warnings due to MAX_ASICS evaluating
as 1. This causes the local variable 'irq' to be 'unsigned int irq[1]',
which makes the 'irq[1]' access invalid.
Just remove the messages.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:16:05 +0000 (13:16 -0700)]
staging: comedi: mite: local symbols should not be exported
The function mite_fifo_size() is only referenced in this file. Make
it static.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:15:32 +0000 (13:15 -0700)]
staging: comedi: ni_mio_cs: local symbols should not be exported
The symbol ni_mio_cs_driver is only referenced in this file. Make
it static.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:15:15 +0000 (13:15 -0700)]
staging: comedi: ni_labpc_cs: local symbols should not be exported
The symbol labpc_cs_driver and the functions labpc_init_module()
and labpc_exit_module() are only referenced in this file. Make
them static.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:14:59 +0000 (13:14 -0700)]
staging: comedi: ni_daq_dio24: local symbols should not be exported
The symbol dio24_cs_driver is only referenced in this file. Make
it static.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:14:41 +0000 (13:14 -0700)]
staging: comedi: ni_pcidio: local functions should not be exported
The function ni_pcidio_event() is only referenced in this file.
Make it static.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:14:24 +0000 (13:14 -0700)]
staging: comedi: ni_660x: local functions should not be exported
The function ni_660x_release_mite_channel() is only referenced in
this file. Make it static.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:14:08 +0000 (13:14 -0700)]
staging: comedi: jr3_pci: local functions should not be exported
The function read_idm_word() is only referenced in this file.
Make it static.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:13:48 +0000 (13:13 -0700)]
staging: comedi: jr3_pci.h: remove vect_bits_t and warning_bits_t
Leave the enum's but remove their names. The names are not used
anywhere in the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:13:32 +0000 (13:13 -0700)]
staging: comedi: ni_mio_common: make internal functions static
The functions ni_release_gpct_mite_channel() and ni_prime_channelgain_list()
are only referenced in this file. Make it static.
The function ni_release_gpct_mite_channel() is also only called
when PCIDMA is enabled. Move the #ifdef to quite a sparse warning
about the function not being used.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 17 Sep 2012 20:13:12 +0000 (13:13 -0700)]
staging: comedi: comedi_fops: make internal function static
The function do_become_nonbusy() is only referenced in this file.
Make it static.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Mon, 17 Sep 2012 14:12:53 +0000 (16:12 +0200)]
staging: sm7xxfb: remove smtc_VRAMBaseAddress
This patch erases smtc_VRAMBaseAddress variable.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Mon, 17 Sep 2012 14:12:52 +0000 (16:12 +0200)]
staging: sm7xxfb: rename pFramebufferPhysical to mmio_base
This patch renames pFramebufferPhysical name to mmio_base.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Mon, 17 Sep 2012 14:12:51 +0000 (16:12 +0200)]
staging: sm7xxfb: rename some smtcfb_info fields
This patch improves naming style and comments on smtcfb_info fields.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Mon, 17 Sep 2012 14:12:50 +0000 (16:12 +0200)]
staging: sm7xxfb: annotate iomem pointers
This patch annotates iomem pointers.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Mon, 17 Sep 2012 14:12:49 +0000 (16:12 +0200)]
staging: sm7xxfb: cleanup on smtc_alloc_fb_info
This patch improves code legibility after last changes.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Mon, 17 Sep 2012 14:12:48 +0000 (16:12 +0200)]
staging: sm7xxfb: clean smtcfb_fix's id initialization
Setting up smtcfb_fix's id happens through smtc_alloc_fb_info. It adds
complexity and unnecesary code.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier M. Mellid [Mon, 17 Sep 2012 14:12:47 +0000 (16:12 +0200)]
staging: sm7xxfb: clean fb_fix_screeninfo and fb_var_screeninfo initialization
Part of fb_fix_screeninfo and fb_var_screeninfo initialization happens
in smtc_alloc_fb_info. It duplicates code while hiding the real
functionality of smtc_alloc_fb_info. This patch groups initialization
together.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Justin P. Mattock [Mon, 17 Sep 2012 15:20:24 +0000 (08:20 -0700)]
staging: "wlags49_h25" Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lauri Hintsala [Mon, 17 Sep 2012 13:26:31 +0000 (16:26 +0300)]
staging: csr: wait for the exec in usermodehelper
The order of wait values has been changed by commit
9d944ef32e.
Fix the wait parameter and start to use a define instead of
"magic number".
Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Randy Dunlap [Mon, 17 Sep 2012 17:33:18 +0000 (10:33 -0700)]
staging: fix csr printk format warning
Fix printk format warning on i386/X86_32 by using 't' for ptrdiff_t.
Also builds cleanly on x86_64.
drivers/staging/csr/csr_wifi_hip_udi.c: In function 'unifi_print_status':
drivers/staging/csr/csr_wifi_hip_udi.c:151:27: warning: format '%ld' expects type 'long int', but argument 5 has type 'int'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 17 Sep 2012 21:42:54 +0000 (14:42 -0700)]
Merge tag 'iio-for-v3.7d' of git://git./linux/kernel/git/jic23/iio into staging-next
IIO new drivers, features and rework for the 3.7 cycle, 4th set.
Here we have
1) a set cleaning up and moving the ad7476 driver out of staging.
Support for a number of additional parts is also added to that driver.
2) cleanups from various people for the in kernel interface code as that
is getting more an more real use and hence people are picking up on
minor issues that made it through review. Also a related useful set
of utility functions to avoid duplicate code for converting IIO
representations to other forms.
3) a new fractional type for our read_raw / write_raw functions.
This allows avoiding loss of accuracy via the in kernel interfaces in some
cases as well as being rather convenient for a lot of range -> scale
conversions.
4) New AD5755 DAC driver.
5) Some Blackfin timer trigger improvements including hardware pulse control
for device triggering.
6) Support for the ad7091r in the ad7476 driver.
Lars-Peter Clausen [Mon, 17 Sep 2012 12:26:00 +0000 (13:26 +0100)]
iio: ad7476: Add support for the ad7091r
Add support for the ad7091r 12 bit ADC to the ad7476 driver. Although the
ad7091r is not really related to any of the other devices supported by this
driver, luckily for us there are not so many ways (which are not totally insane)
how sampling a single channel ADC via SPI can be implemented and support for the
ad7091r can be added to the driver with just a few adjustments.
The ad7091r requires an external "conversion start" pulse to start a sample
conversion. After the conversion has finished the result can be read via SPI. We
depend on a IIO trigger to generate this signal, as a result only sampling in
buffered mode and not in manual mode is available.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Mon, 17 Sep 2012 12:26:00 +0000 (13:26 +0100)]
staging:iio:trigger:bfintmr Add output support
Some converters require an external signal to start the conversion. This patch
adds support to the bfintmr trigger driver to generate such a signal.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Mon, 17 Sep 2012 12:26:00 +0000 (13:26 +0100)]
staging:iio:trigger:bfintmr: Only enable timer when necessary
This patch hooks up the set_trigger_state callback for the blackfin timer
trigger driver and only enables the timer when a trigger consumer requests it to
be enabled. There really is no reason to keep the timer running and generate
interrupts if nobody is listening to them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Mon, 17 Sep 2012 12:26:00 +0000 (13:26 +0100)]
staging:iio:trigger:bfintmr: Avoid divide by zero
If the timer frequency has not been configured yet get_gptimer_period() will
return 0. Handle this case instead of blindly dividing by the returned value.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Mon, 17 Sep 2012 12:17:00 +0000 (13:17 +0100)]
staging:iio:hwmon bridge: Use iio_read_channel_processed
Use the iio_read_channel_processed function to read the sample value in the
proper unit instead of using iio_read_channel_raw and iio_read_channel_scale and
doing the unit conversion manually.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Mon, 17 Sep 2012 12:17:00 +0000 (13:17 +0100)]
iio:inkern: Add function to read the processed value
Add a function to read a processed value from a channel. The function will first
attempt to read the IIO_CHAN_INFO_PROCESSED attribute. If that fails it will
read the IIO_CHAN_INFO_RAW attribute and convert the result from a raw value to
a processed value.
The patch also introduces a function to convert raw value to a processed value
and exports it, in case a user needs or wants to do the conversion by itself.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Mon, 17 Sep 2012 12:17:00 +0000 (13:17 +0100)]
iio: consumer.h: Fix kernel doc incosistency
For the iio_read_channel_raw and iio_read_channel_scale the kerneldoc comment
refers to an argument called "channel", while the argument is called "chan" in
the function signature. This leads to the following warnings from kerneldoc:
Warning(include/linux/iio/consumer.h:71): No description found for parameter 'chan'
Warning(include/linux/iio/consumer.h:71): Excess function parameter 'channel' description in 'iio_read_channel_raw'
Warning(include/linux/iio/consumer.h:109): No description found for parameter 'chan'
Warning(include/linux/iio/consumer.h:109): Excess function parameter 'channel' description in 'iio_read_channel_scale'
This patch fixes the warnings by naming them consistently.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Mon, 17 Sep 2012 09:24:00 +0000 (10:24 +0100)]
iio:dac: Add ad5755 driver
This patch adds support for the AD5755, AD5755-1, AD5757, AD5735, AD5737 16 and
14 bit quad-channel DACs. The AD5757/AD5737 only have current outputs, but
for the AD5755/AD5757 each of the outputs can be configured to either be a
voltage or a current output. We only allow to configure this at device probe
time since usually this needs to match the external circuitry and should not be
changed on the fly.
A few trivial formatting changes on merge.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Kim, Milo [Mon, 17 Sep 2012 08:44:00 +0000 (09:44 +0100)]
iio: inkern: add error case in iio_channel_get()
The datasheet name is defined in the IIO driver.
On the other hand, the adc_channel_label is configured in
the platform side.
If the datasheet name is not matched with any adc_channel_label,
the iio_channel_get() should be returned as error for preventing
invalid channel data access.
This can be handled either way.
(a) checking null data when using it : in the xxx_read_raw()
or
(b) error returns when the channel is requested : this patch
The IIO consumer can't use the channel with invalid channel spec.
Therefore case (b) is more reasonable.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Macpaul Lin [Fri, 14 Sep 2012 06:02:04 +0000 (14:02 +0800)]
staging/gdm72xx: usb_boot: replace firmware upgrade API in em_download
Replace firmware upgrade API in em_download_image().
Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Toshiaki Yamane [Sun, 16 Sep 2012 07:26:38 +0000 (16:26 +0900)]
staging/rts_pstor: Use pr_ or dev_ printks in rtsx.c
fixed some checkpatch warnings.
-WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
-WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
-WARNING: quoted string split across lines
And added pr_fmt.
Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Cotey [Sat, 15 Sep 2012 13:12:36 +0000 (06:12 -0700)]
Staging: silicom: checkpatch.pl cleanup: pretty pointers
last of the unstylistic pointers cleaned up
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Cotey [Sat, 15 Sep 2012 13:12:05 +0000 (06:12 -0700)]
Staging: silicom: checkpatch.pl cleanup: pretty pointers
pointer style cleanup
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Cotey [Sat, 15 Sep 2012 13:11:41 +0000 (06:11 -0700)]
Staging: silicom: checkpatch.pl cleanup: pretty pointers
more checkpatch cleanups of pointers.
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Cotey [Sat, 15 Sep 2012 13:11:15 +0000 (06:11 -0700)]
Staging: silicom: checkpatch.pl cleanup: pretty pointers
More pointer style cleanup
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Cotey [Sat, 15 Sep 2012 13:10:49 +0000 (06:10 -0700)]
Staging: silicom: checkpatch.pl cleanup: pretty pointers
More notation fixes
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Cotey [Sat, 15 Sep 2012 13:10:21 +0000 (06:10 -0700)]
Staging: silicom: checkpatch.pl cleanup: pretty pointers
first chunk, straighten up the pointer notation
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>