[PATCH 3/4 v2] Staging: comedi: addi-data: convert printk() to dev_err()

2014-02-17 Thread Chase Southwood
This patch for hwdrv_apci035.c changes a printk() call to a dev_err() call since this is generally preferred. It also removes a newline from the start of the error message. Signed-off-by: Chase Southwood --- 2: Removed leading newline, per Ian's request. drivers/staging/comedi/drivers/addi-dat

[PATCH 78/87] staging: comedi: pcl818: rename 'irq_blocked' in private data

2014-02-17 Thread H Hartley Sweeten
This member in the private data is a flag that indicates that an analog input async command is currently running. Rename it to make this clear. The private data is kzalloc'ed in the attach so remove the unnecessary clearing of this flag. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg

[PATCH 87/87] staging: comedi: pcl818: kzalloc'ed memory does not need to be cleared

2014-02-17 Thread H Hartley Sweeten
The private data is kzalloc'ed in the (*attach). There is no need to initialize and the members to 0. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/d

HELLO,SIR/MADAM

2014-02-17 Thread Ibrahim Moustafa
HELLO,SIR/MADAM I AND MY MOTHER JUST ARRIVE HERE IN MALAYSIA WITH A CONSIGHNMENT BOX THAT CONTAINS SIX MILLION AND FIVE HUNDRED THOUNSUND I NEED YOUR ASSISTANCE US TO CLEAR AND RECEIEVE TO YOUR POSSESSION AS OUR FORIEN BENEFICIARY SO THAT WE CAN INVEST IN A PROFITABLE IN YOUR CONUTRY PLEASE CON

[PATCH 84/87] staging: comedi: pcl816: tidy up pcl818_check()

2014-02-17 Thread H Hartley Sweeten
This function probes a number of the boards registers during the (*attach) to verify that it is actually a PCL-816 compatible board. For aesthetics, move the function closer to the (*attach). To better match the pcl818 driver, allocate the private data before calling pcl816_check(). Refactor the

[PATCH 79/87] staging: comedi: pcl816: remove unnecessary 'dev->irq' check

2014-02-17 Thread H Hartley Sweeten
If the dev->irq is not valid the interrupt function will not be hooked up during the attach. Remove the unnecessary check. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [PATCH RFC 01/17 v2] staging: dgap: Merge dgap_fep5.c into dgap_driver.c

2014-02-17 Thread Greg Kroah-Hartman
On Mon, Feb 17, 2014 at 02:32:28PM -0500, Mark Hounschell wrote: > On 02/14/2014 01:18 PM, Greg Kroah-Hartman wrote: > > On Fri, Feb 14, 2014 at 12:45:30PM -0500, Mark Hounschell wrote: > >> On 02/14/2014 12:38 PM, Greg Kroah-Hartman wrote: > >>> On Wed, Feb 12, 2014 at 03:32:10PM -0500, Mark Houns

[PATCH 82/87] staging: comedi: pcl818: remove unnecessary function separation comments

2014-02-17 Thread H Hartley Sweeten
These comments are just added cruft. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 66 - 1 file changed, 66 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/

[PATCH 80/87] staging: comedi: pcl812: remove unnecessary function separation comments

2014-02-17 Thread H Hartley Sweeten
These comments are just added cruft. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 39 - 1 file changed, 39 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/

[PATCH 83/87] staging: comedi: pcl818: tidy up pcl818_check()

2014-02-17 Thread H Hartley Sweeten
This function probes a number of the boards registers during the (*attach) to verify that it is actually a PCL-818 compatible board. For aesthetics, move the function closer to the (*attach). Refactor the function to return an errno if fails. Change the errno from -EIO to -ENODEV and remove the un

[PATCH 85/87] staging: comedi: pcl812: allocate private data before requesting the I/O region

2014-02-17 Thread H Hartley Sweeten
To better match the pcl818 and pcl816 drivers, allocate the private data before calling comedi_request_region(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) dif

Re: [PATCH 0/3] Drivers: net: hyperv: Cleanup the hyper-V networking code

2014-02-17 Thread David Miller
From: "K. Y. Srinivasan" Date: Sun, 16 Feb 2014 16:38:03 -0800 > Get rid of some unnecessary code and some general cleanup. > > K. Y. Srinivasan (3): > Drivers: net: hyperv: Get rid of the rndis_filter_packet structure > Drivers: net: hyperv: Cleanup the receive path > Drivers: net: hyperv

[PATCH 51/87] staging: comedi: pcl818: remove 'ai_n_chan' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/staging/come

[PATCH 76/87] staging: comedi: pcl818: convert private data flags to bit-fields

2014-02-17 Thread H Hartley Sweeten
Convert the flags in the private data to bit-fields to save a bit of space. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/driv

[PATCH 66/87] staging: comedi: pcl812: use subdevice (*cancel)

2014-02-17 Thread H Hartley Sweeten
Use the subdevice (*cancel) operation to remove the need for a forward declaration. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/com

[PATCH 60/87] staging: comedi: pcl816: use 8253.h helpers

2014-02-17 Thread H Hartley Sweeten
Use the helper functions in 8253.h to clarify the timer programming. Move start_pacer() to remove the need for the forward declarations. Rename the function so it has namespace associated with the driver. Change the 'mode' parameter. This parameter is really a flag to the function indicating if t

[PATCH 59/87] staging: comedi: pcl812: use 8253.h helpers

2014-02-17 Thread H Hartley Sweeten
Use the helper functions in 8253.h to clarify the timer programming. Move start_pacer() to remove the need for the forward declarations. Rename the function so it has namespace associated with the driver. Change the 'mode' parameter. This parameter is really a flag to the function indicating if t

[PATCH 81/87] staging: comedi: pcl816: remove unnecessary function separation comments

2014-02-17 Thread H Hartley Sweeten
These comments are just added cruft. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 40 - 1 file changed, 40 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/

[PATCH 73/87] staging: comedi: pcl816: remove 'ai_act_chanlist_{len, pos}' from private data

2014-02-17 Thread H Hartley Sweeten
These members of the private data don't do anything usefull. Just remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl

[PATCH 14/87] staging: comedi: pcl812: clarify dma channel request in pcl812_attach()

2014-02-17 Thread H Hartley Sweeten
All the board types that can do DMA can use DMA channels 3 or 1. Remove the 'DMAbits', which is a mask of the valid channels, from the boardinfo and replace it with a bit-field flag 'has_dma'. Refactor pcl812_attach() to use the new flag and remove the need for the goto. Signed-off-by: H Hartley

[PATCH 56/87] staging: comedi: pcl818: tidy up dma buffer allocation

2014-02-17 Thread H Hartley Sweeten
This driver uses 2 buffers for DMA. Refactor the buffer allocation to use a for loop to remove code duplication. Remove the dev_err() messages when __get_dma_pages() fails and change the errno returned from -EBUSY to -ENOMEM. Both buffers are the same size so replace the 'dmapages' and 'hwdmasize'

[PATCH 77/87] staging: comedi: pcl816: rename 'irq_blocked' in private data

2014-02-17 Thread H Hartley Sweeten
This member in the private data is a flag that indicates that an analog input async command is currently running. Rename it to make this clear. The private data is kzalloc'ed in the attach so remove the unnecessary clearing of this flag. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg

[PATCH 28/87] staging: comedi: pcl816: remove 'n_ranges' from boardinfo

2014-02-17 Thread H Hartley Sweeten
This member in the boardinfo is not used. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/driver

[PATCH 86/87] staging: comedi: pcl816: kzalloc'ed memory does not need to be cleared

2014-02-17 Thread H Hartley Sweeten
The private data is kzalloc'ed in the (*attach). There is no need to initialize and the members to 0. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/d

[PATCH 62/87] staging: comedi: pcl816: remove unneeded forward declarations

2014-02-17 Thread H Hartley Sweeten
These forward declarations are not needed. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816

[PATCH 70/87] staging: comedi: pcl818: remove 'ai_timer[12]' from private data

2014-02-17 Thread H Hartley Sweeten
These members of the private data are set but never used. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/s

[PATCH 71/87] staging: comedi: pcl812: remove 'ai_chanlist' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->chanlist. Use that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/sta

[PATCH 61/87] staging: comedi: pcl818: use 8253.h helpers

2014-02-17 Thread H Hartley Sweeten
Use the helper functions in 8253.h to clarify the timer programming. Move start_pacer() to remove the need for the forward declarations. Rename the function so it has namespace associated with the driver. Change the 'mode' parameter. This parameter is really a flag to the function indicating if t

[PATCH 68/87] staging: comedi: pcl818: use subdevice (*cancel)

2014-02-17 Thread H Hartley Sweeten
Use the subdevice (*cancel) operation to remove the need for a forward declaration. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/

[PATCH 39/87] staging: comedi: pcl812: remove 'ai_maxdata' from boardinfo

2014-02-17 Thread H Hartley Sweeten
Most of the board types supported by this driver have 12-bit analog inputs. Two of them, the acl8216 and a826pg, have 16-bit analog inputs. Remove the 'ai_maxdata' member from the boardinfo and replace it with a bit-field flag 'has_16bit_ai'. Refactor pcl812_attach() to use this new boardinfo. Si

[PATCH 40/87] staging: comedi: pcl812: introduce pcl812_ai_get_sample()

2014-02-17 Thread H Hartley Sweeten
Introduce a helper function to read the 12/16-bit analog input data sample. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/drive

[PATCH 64/87] staging: comedi: pcl816: don't calc the timer divisors twice

2014-02-17 Thread H Hartley Sweeten
The timer divisors are calculated in the (*do_cmdtest) before the (*do_cmd) is called by the comedi core. The extra sanity checks in the (*do_cmd) are not necessary, the values returned from i8253_cascade_ns_to_timer() will be greater than 1. Save the values in the private data so they don't need t

[PATCH 50/87] staging: comedi: pcl816: remove 'ai_n_chan' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/p

[PATCH 31/87] staging: comedi: pcl816: remove incorrect 'ai_chanlist' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The maximum chanlist that this hardware can handle is 16 (the number of input channels). Remove this incorrect data from the boardinfo and just initialize the subdevice 'len_chanlist' to subdevice 'n_chan'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/sta

[PATCH 46/87] staging: comedi: pcl812: remove 'ai_scans' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->stop_arg. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/staging/comedi/dr

[PATCH 08/87] staging: comedi: pcl818: remove 'io_range' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'io_range' is the same for all board types. Remove this data from the boardinfo. The i/o resource size is larger for board types that have a FIFO but this larger region is only requested if the user wants to use the fifo. Modify the pcl818_attach() to remove the need for the 'io_range' in the

[PATCH 53/87] staging: comedi: pcl818: remove 'ai_flags' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is not used. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/driv

[PATCH 67/87] staging: comedi: pcl816: use subdevice (*cancel)

2014-02-17 Thread H Hartley Sweeten
Use the subdevice (*cancel) operation to remove the need for a forward declaration. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/com

[PATCH 55/87] staging: comedi: pcl816: tidy up dma buffer allocation

2014-02-17 Thread H Hartley Sweeten
This driver uses 2 buffers for DMA. Refactor the buffer allocation to use a for loop to remove code duplication. Remove the dev_err() messages when __get_dma_pages() fails and change the errno returned from -EBUSY to -ENOMEM. Both buffers are the same size so replace the 'dmapages' and 'hwdmasize'

[PATCH 72/87] staging: comedi: pcl818: remove 'ai_chanlist' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a pointer to the cmd->chanlist. Use that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/stagi

[PATCH 65/87] staging: comedi: pcl818: don't calc the timer divisors twice

2014-02-17 Thread H Hartley Sweeten
The timer divisors are calculated in the (*do_cmdtest) before the (*do_cmd) is called by the comedi core. The extra sanity checks in the (*do_cmd) are not necessary, the values returned from i8253_cascade_ns_to_timer() will be greater than 1. Save the values in the private data so they don't need t

[PATCH 15/87] staging: comedi: pcl816: clarify dma channel request in pcl816_attach()

2014-02-17 Thread H Hartley Sweeten
All the board types can do DMA using DMA channels 3 or 1. Remove the 'DMAbits', which is a mask of the valid channels, from the boardinfo. Refactor pcl816_attach() to remove the need for the goto. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comed

[PATCH 35/87] staging: comedi: pcl816: clarify irq request in pcl816_attach()

2014-02-17 Thread H Hartley Sweeten
All the board types can use IRQ 2-7 for async command support. Remove the 'IRQbits', which is a mask of the valid IRQs, from the boardinfo and refactor pcl816_attach(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 6 ++

[PATCH 58/87] staging: comedi: pcl818: remove 'last_int_sub' from private data

2014-02-17 Thread H Hartley Sweeten
THis member of the private data is set but never used. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/c

[PATCH 45/87] staging: comedi: pcl812: remove 'valid' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is set but never used. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging

[PATCH 75/87] staging: comedi: pcl816: convert private data flags to bit-fields

2014-02-17 Thread H Hartley Sweeten
Convert the flags in the private data to bit-fields to save a bit of space. The 'irq_was_now_closed' member is actually a flag, devpriv->int816_mode will always be > 0 when it's used to set irq_was_now_closed in the cancel function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah

[PATCH 52/87] staging: comedi: pcl812: remove 'ai_flags' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->flags. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b

[PATCH 32/87] staging: comedi: pcl816: remove 'ai_range_type' from boardinfo

2014-02-17 Thread H Hartley Sweeten
All the board types use the same analog input range_table. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/sta

[PATCH 69/87] staging: comedi: pcl818: remove analog output interrupt code

2014-02-17 Thread H Hartley Sweeten
The hardware does not have any analog output interrupt support. Remove the stubbed in code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/com

[PATCH 26/87] staging: comedi: pcl818: all board types have analog inputs

2014-02-17 Thread H Hartley Sweeten
All the boards supported by this driver have 16 single-ended analog input channels. The boards can also be configued to give 8 differential inputs. Remove the 'n_aichan_se' and 'n_aichan_diff' members from the boardinfo and refactor pcl818_attach(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbot

[PATCH 13/87] staging: comedi: pcl818: remove 'rangelist_ao' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'rangelist_ao' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/stag

[PATCH 54/87] staging: comedi: pcl812: tidy up dma buffer allocation

2014-02-17 Thread H Hartley Sweeten
This driver uses 2 buffers for DMA. Refactor the buffer allocation to use a for loop to remove code duplication. Remove the dev_err() messages when __get_dma_pages() fails and change the errno returned from -EBUSY to -ENOMEM. Both buffers are the same size so replace the 'dmapages' and 'hwdmasize'

[PATCH 74/87] staging: comedi: pcl812: convert private data flags to bit-fields

2014-02-17 Thread H Hartley Sweeten
Convert the flags in the private data to bit-fields to save a bit of space. Rename the CamelCase 'use_MPC' member. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 16 1 file changed, 8 insertions(+), 8 delet

[PATCH 17/87] staging: comedi: pcl812: rename 'haveMPC508' in boardinfo

2014-02-17 Thread H Hartley Sweeten
Rename this CamelCase member in the boardinfo and change it to a bit- field flag. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/co

[PATCH 47/87] staging: comedi: pcl816: remove 'ai_scans' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->stop_arg. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/staging/comedi/dri

[PATCH 48/87] staging: comedi: pcl818: remove 'ai_scans' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->stop_arg. Refactor the code to follow the style of pcl812 and pcl816 drivers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 14 +- 1 file changed, 5 in

[PATCH 42/87] staging: comedi: pcl818: introduce pcl818_ai_get_sample()

2014-02-17 Thread H Hartley Sweeten
Introduce a helper function to read the 12-bit analog input data sample and optionally return the channel that the sample was for. The channel is only used in the interrupt routine to check for dropped samples. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/

[PATCH 22/87] staging: comedi: pcl812: factor analog input range selection out of (*attach)

2014-02-17 Thread H Hartley Sweeten
The analog input subdevice range is setup in this driver based on a config option passed by the user. Factor the code that sets the range_table out of pcl812_attach() to clarify the (*attach). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/dri

[PATCH 09/87] staging: comedi: pcl812: remove 'i8254_osc_base' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'i8254_osc_base' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a

[PATCH 41/87] staging: comedi: pcl816: introduce pcl816_ai_get_sample()

2014-02-17 Thread H Hartley Sweeten
Introduce a helper function to read the 14/16-bit analog input data sample. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/driver

[PATCH 57/87] staging: comedi: pcl816: remove 'last_int_sub' from private data

2014-02-17 Thread H Hartley Sweeten
THis member of the private data is set but never used. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/c

[PATCH 44/87] staging: comedi: pcl812: remove acl8216_ai_insn_read()

2014-02-17 Thread H Hartley Sweeten
This (*insn_read) function was used to read 16-bit analog input data from the boardACL8216 boardtypes. The 12/16-bit differences are now handled by the pcl812_ai_eoc() and pcl812_ai_get_sample() helpers. Remove this function and use pcl812_ai_insn_read() for all boardtypes. Signed-off-by: H Hartl

[PATCH 37/87] staging: comedi: pcl818: remove 'ai_maxdata' from boardinfo

2014-02-17 Thread H Hartley Sweeten
All the board types have 12-bit analog inputs. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/c

[PATCH 33/87] staging: comedi: pcl816: remove 'ai_ns_min' from boardinfo

2014-02-17 Thread H Hartley Sweeten
This member of the boardinfo is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --

[PATCH 63/87] staging: comedi: pcl812: don't calc the timer divisors twice

2014-02-17 Thread H Hartley Sweeten
The timer divisors are calculated in the (*do_cmdtest) before the (*do_cmd) is called by the comedi core. Save the values in the private data so they don't need to be recalced. Refactor pcl812_start_pacer() to use the values from the private data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott

[PATCH 49/87] staging: comedi: pcl812: remove 'ai_n_chan' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/staging/comed

[PATCH 04/87] staging: comedi: pcl812: remove 0/NULL initialzation in boardinfo

2014-02-17 Thread H Hartley Sweeten
The unlisted members in the boardinfo declaration will default to 0/NULL. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 61 - 1 file changed, 61 deletions(-) diff --git a/drivers/staging/com

[PATCH 00/87] staging: comedi: cleanup pcl812/816/818 drivers

2014-02-17 Thread H Hartley Sweeten
These comedi drivers are all very similar so it made sense to clean them up together. This series removes a bunch of the cruft in the drivers and reduces the boardinfo and private data. H Hartley Sweeten (87): staging: comedi: pcl812: convert boardinfo declaration to C99 format staging: comed

[PATCH 20/87] staging: comedi: pcl818: all board types have digital inputs and outputs

2014-02-17 Thread H Hartley Sweeten
All the board types have 16 digital inputs and 16 digital outputs. Remove the 'n_dichan' and 'n_dochan' members in the boardinfo. Refactor pcl818_attach() to always setup these subdevices. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driver

[PATCH 24/87] staging: comedi: pcl812: all board types have analog inputs

2014-02-17 Thread H Hartley Sweeten
All the boards supported by this driver have 16 or 32 analog input channels. Remove the unnecessary check in pcl812_attach() to reduce the indent level of the code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 104 +++

[PATCH 25/87] staging: comedi: pcl816: all board types have 16 analog inputs

2014-02-17 Thread H Hartley Sweeten
All the boards supported by this driver have 16 analog input channels. Remove the 'n_aichan' member from the boardinfo and refactor pcl816_attach(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 35 +---

[PATCH 11/87] staging: comedi: pcl812: remove 'rangelist_ao' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'rangelist_ao' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drive

[PATCH 01/87] staging: comedi: pcl812: convert boardinfo declaration to C99 format

2014-02-17 Thread H Hartley Sweeten
To reduce editing errors and make the data more maintainable, convert the boardinfo declaration to C99 format. For aesthetics, move the declaration closer to the definition and remove the unnecessary comments in the definition. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hart

[PATCH 06/87] staging: comedi: pcl812: remove 'io_range' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'io_range' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/dr

[PATCH 23/87] staging: comedi: pcl818: factor analog input range selection out of (*attach)

2014-02-17 Thread H Hartley Sweeten
The analog input subdevice range is setup in this driver based on a config option passed by the user. Factor the code that sets the range_table out of pcl818_attach() to clarify the (*attach). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/dri

[PATCH 05/87] staging: comedi: pcl818: remove 0/NULL initialzation in boardinfo

2014-02-17 Thread H Hartley Sweeten
The unlisted members in the boardinfo declaration will default to 0/NULL. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/driv

[PATCH 34/87] staging: comedi: pcl816: remove 'n_aochan' from boardinfo

2014-02-17 Thread H Hartley Sweeten
This member of the boardinfo is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/

[PATCH 16/87] staging: comedi: pcl818: clarify dma channel request in pcl818_attach()

2014-02-17 Thread H Hartley Sweeten
All the board types that can do DMA can use DMA channels 3 or 1. Remove the 'DMAbits', which is a mask of the valid channels, from the boardinfo and replace it with a bit-field flag 'has_dma'. Refactor pcl818_attach() to use the new flag and remove the need for the goto. Signed-off-by: H Hartley

[PATCH 03/87] staging: comedi: pcl818: convert boardinfo declaration to C99 format

2014-02-17 Thread H Hartley Sweeten
To reduce editing errors and make the data more maintainable, convert the boardinfo declaration to C99 format. For aesthetics, move the declaration closer to the definition and remove the unnecessary comments in the definition. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hart

[PATCH 30/87] staging: comedi: pcl816: remove 'ao_chanlist' from boardinfo

2014-02-17 Thread H Hartley Sweeten
This member in the boardinfo is the same for all board types. Remove it. The comedi core will initalize the subdevice len_chanlist to 1 if it is not set by the driver so remove the unnecessary initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/s

[PATCH 12/87] staging: comedi: pcl816: remove 'rangelist_ao' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'rangelist_ao' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/co

[PATCH 07/87] staging: comedi: pcl816: remove 'io_range' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'io_range' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/staging/co

[PATCH 21/87] staging: comedi: pcl816: all board types have digital inputs and outputs

2014-02-17 Thread H Hartley Sweeten
All the board types have 16 digital inputs and 16 digital outputs. Remove the 'n_dichan' and 'n_dochan' members in the boardinfo. The subdevice support code is currently incomplete in this driver. For now just tidy up the incomplete subdevice code in pcl816_attach(). Signed-off-by: H Hartley Swe

[PATCH 02/87] staging: comedi: pcl816: convert boardinfo declaration to C99 format

2014-02-17 Thread H Hartley Sweeten
To reduce editing errors and make the data more maintainable, convert the boardinfo declaration to C99 format. For aesthetics, move the declaration closer to the definition and remove the unnecessary comments in the definition. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hart

[PATCH 18/87] staging: comedi: pcl818: change 'is_818' in boardinfo to a bit-field

2014-02-17 Thread H Hartley Sweeten
Change this flag in the boardinfo into a bit-field. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/

[PATCH 19/87] staging: comedi: pcl812: tidy up digital subdevice boardinfo

2014-02-17 Thread H Hartley Sweeten
For the board types that have digital inputs and outputs there are always 16 input channels and 16 output channels. Remove the 'n_dichan' and 'n_dochan' members in the boardinfo and replace them with a bit-field flag 'has_dio'. Refactor pcl812_attach() to use the new boardinfo. Signed-off-by: H H

[PATCH 38/87] staging: comedi: pcl818: remove 'ao_maxdata' from boardinfo

2014-02-17 Thread H Hartley Sweeten
All the board types have 12-bit analog outputs. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/

[PATCH 29/87] staging: comedi: pcl818: remove 'n_ranges' from boardinfo

2014-02-17 Thread H Hartley Sweeten
This member in the boardinfo is not used. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/d

[PATCH 36/87] staging: comedi: pcl818: clarify irq request in pcl818_attach()

2014-02-17 Thread H Hartley Sweeten
All the board types can use IRQ 2-7 for async command support. Remove the 'IRQbits', which is a mask of the valid IRQs, from the boardinfo and refactor pcl818_attach(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 11 ++---

[PATCH 43/87] staging: comedi: pcl812: remove 'ai_is16b' from private data

2014-02-17 Thread H Hartley Sweeten
We can check the subdevice 'maxdata' to determine if the analog input data is 12 or 16-bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/stag

[PATCH 27/87] staging: comedi: pcl812: tidy up differential ai user option

2014-02-17 Thread H Hartley Sweeten
Some of the boards supported by this driver can do differential analog input when configureg with jumpers on the board. When diff. ai is used the number of input channels is half the single-ended number of channels. The user specifies the analog input mode for these boards when attaching to the dri

[PATCH 10/87] staging: comedi: pcl816: remove 'i8254_osc_base' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'i8254_osc_base' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/stagi

Re: [PATCH 3/4] Staging: comedi: addi-data: convert printk() to dev_err()

2014-02-17 Thread Chase Southwood
>On Monday, February 17, 2014 7:18 AM, Ian Abbott wrote: >>On 2014-02-16 08:41, Chase Southwood wrote: >> >> This patch for hwdrv_apci035.c changes a printk() call to a dev_err call >> since this is generally preferred. >> >> Signed-off-by: Chase Southwood >> --- >>  drivers/staging/comedi/driv

Re: [PATCH 1/4] Staging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c

2014-02-17 Thread Chase Southwood
>On Monday, February 17, 2014 7:16 AM, Ian Abbott wrote: >>On 2014-02-16 08:40, Chase Southwood wrote: >> This patch for hwdrv_apci035 removes some unneeded braces, and moves some >> improperly placed braces to the correct position, as found by checkpatch. >> It also removes a commented out if-st

Re: [patch 1/2] staging/bcm: two information leaks in ioctl

2014-02-17 Thread Dave Jones
On Mon, Feb 17, 2014 at 11:13:16PM +0300, Dan Carpenter wrote: > On Mon, Feb 17, 2014 at 02:59:19PM -0500, Dave Jones wrote: > > On Mon, Feb 17, 2014 at 10:56:06PM +0300, Dan Carpenter wrote: > > > There are a couple paths where we don't check how much data we copy back > > > to the user. >

Re: [patch 1/2] staging/bcm: two information leaks in ioctl

2014-02-17 Thread Dan Carpenter
On Mon, Feb 17, 2014 at 02:59:19PM -0500, Dave Jones wrote: > On Mon, Feb 17, 2014 at 10:56:06PM +0300, Dan Carpenter wrote: > > There are a couple paths where we don't check how much data we copy back > > to the user. > > I'm curious, is this something smatch is only picking up now that > I cho

Re: [patch 1/2] staging/bcm: two information leaks in ioctl

2014-02-17 Thread Dave Jones
On Mon, Feb 17, 2014 at 10:56:06PM +0300, Dan Carpenter wrote: > There are a couple paths where we don't check how much data we copy back > to the user. I'm curious, is this something smatch is only picking up now that I chopped up that mega function into lots of little functions ? Dave

[patch 2/2] staging/bcm: integer underflow leads to Oom

2014-02-17 Thread Dan Carpenter
We do: if (NOB > DEFAULT_BUFF_SIZE) BuffSize = DEFAULT_BUFF_SIZE; else BuffSize = NOB; Since NOB can be negative it results in a larger than intended BuffSize and makes kzalloc() fail. The code is still a bit crap because it lets the users read as

[patch 1/2] staging/bcm: two information leaks in ioctl

2014-02-17 Thread Dan Carpenter
There are a couple paths where we don't check how much data we copy back to the user. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index fdebc3bba0b5..6f1997dc44c8 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmc

Re: [PATCH RFC 01/17 v2] staging: dgap: Merge dgap_fep5.c into dgap_driver.c

2014-02-17 Thread Mark Hounschell
On 02/14/2014 01:18 PM, Greg Kroah-Hartman wrote: > On Fri, Feb 14, 2014 at 12:45:30PM -0500, Mark Hounschell wrote: >> On 02/14/2014 12:38 PM, Greg Kroah-Hartman wrote: >>> On Wed, Feb 12, 2014 at 03:32:10PM -0500, Mark Hounschell wrote: There is a lot of cleanup work to do on these digi driv

  1   2   >