[PATCH] staging: rtl8192u: initialize array in C compliant way

2014-05-06 Thread Martin Kepplinger
Don't list elements to initialize. Remaining elements of a partly
initialized array are set to zero. Sparse complained here.

Signed-off-by: Martin Kepplinger 
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c 
b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
index 426f223..c96dbab 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
@@ -241,7 +241,7 @@ static PTS_COMMON_INFO SearchAdmitTRStream(struct 
ieee80211_device *ieee,
 {
//DIRECTION_VALUE   dir;
u8  dir;
-   boolsearch_dir[4] = {0, 0, 0, 0};
+   boolsearch_dir[4] = {0};
struct list_head*psearch_list; //FIXME
PTS_COMMON_INFO pRet = NULL;
if(ieee->iw_mode == IW_MODE_MASTER) //ap mode
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RESEND PATCH] staging: vt6656: make spin_lock_irq() human readable

2014-05-06 Thread Dan Carpenter
On Tue, May 06, 2014 at 07:58:39AM +0200, Martin Kepplinger wrote:
> Don't require FIRMWAREbDownload() to, first off, unlock a held lock.
> Thus do all locking in main_usb.c and hold it for a insignificantly
> shorter period of time. This makes the affected area significantly more
> readable though.
> 
> Signed-off-by: Martin Kepplinger 

Reviewed-by: Dan Carpenter 

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8192u: initialize array in C compliant way

2014-05-06 Thread Dan Carpenter
On Tue, May 06, 2014 at 10:22:08AM +0200, Martin Kepplinger wrote:
> Don't list elements to initialize. Remaining elements of a partly
> initialized array are set to zero. Sparse complained here.
> 
> Signed-off-by: Martin Kepplinger 
> ---
>  drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c 
> b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
> index 426f223..c96dbab 100644
> --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
> +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
> @@ -241,7 +241,7 @@ static PTS_COMMON_INFO SearchAdmitTRStream(struct 
> ieee80211_device *ieee,
>  {
>   //DIRECTION_VALUE   dir;
>   u8  dir;
> - boolsearch_dir[4] = {0, 0, 0, 0};
> + boolsearch_dir[4] = {0};

That's weird.  The original code is valid but it generates a sparse
warning.

drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:244:58: warning: 
Initializer entry defined twice
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:244:61:   also defined here

It has something to do with "_Bool" types.  Changing it to "int" will
also make the warning disappear.  I've CC'd the sparse list to see if
anyone knows what's happening.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [GIT PULL] imx-drm urgent fixes

2014-05-06 Thread Russell King
Greg,

Did you get a chance to look at this?

Thanks.

On Sun, Apr 27, 2014 at 09:03:25PM +0100, Russell King wrote:
> Greg,
> 
> Please incorporate the latest imx-drm urgent fixes, which can be found at:
> 
>   git://ftp.arm.linux.org.uk/~rmk/linux-arm.git imx-drm-fixes-urgent
> 
> with SHA1 a3fe964135d0e4b925eaf4a5891c84daa7885c86.
> 
> These are the urgent fixes which should be required.  arm-soc people have
> acked the change to arch/arm/boot/dts, and have okayed it to go via the
> stable tree.
> 
> This will update the following files:
> 
>  arch/arm/boot/dts/imx53-mba53.dts  | 2 +-
>  drivers/staging/imx-drm/imx-drm-core.c | 7 ++-
>  drivers/staging/imx-drm/imx-tve.c  | 2 +-
>  3 files changed, 8 insertions(+), 3 deletions(-)
> 
> through these changes:
> 
> Philipp Zabel (1):
>   imx-drm: imx-drm-core: fix imx_drm_encoder_get_mux_id
> 
> Shawn Guo (2):
>   imx-drm: imx-drm-core: skip components whose parent device is disabled
>   imx-drm: imx-tve: correct DDC property name to 'ddc-i2c-bus'
> 
> Many thanks.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [GIT PULL] imx-drm non-urgent fixes

2014-05-06 Thread Russell King
Greg,

Did you get a chance to look at this?

Thanks.

On Sun, Apr 27, 2014 at 09:09:24PM +0100, Russell King wrote:
> Greg,
> 
> Please incorporate the latest imx-drm non-urgent fixes, which can be found at:
> 
>   git://ftp.arm.linux.org.uk/~rmk/linux-arm.git imx-drm-fixes
> 
> with SHA1 1e6d486be4ea3f17c99c933703f53a6d566292a9.
> 
> These are the less urgent fixes, but nevertheless, I think they should
> be submitted for an -rc kernel at some point during this cycle.
> 
> The change from Denis gets rid of some confusion about clock polarities,
> and aligns the code with u-boot's code.  This is more a cleanup than a
> fix, but it is low impact as a grep reveals that both sites that use this
> variable are fixed appropriately.
> 
> The remainder from Philipp resolve a bug in the driver where the hardware
> stops providing video data after a number of modesets, and requires the
> SoC to be reset to recover.  This required some reorganisation of the code,
> which is why the change is soo large and has been split across multiple
> patches.
> 
> I've been running this with imx-hdmi locally for a number of weeks and
> have seen nothing detrimental.
> 
> This will update the following files:
> 
>  drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h |  5 ++
>  drivers/staging/imx-drm/ipu-v3/ipu-common.c | 41 --
>  drivers/staging/imx-drm/ipu-v3/ipu-dc.c | 85 
> +
>  drivers/staging/imx-drm/ipu-v3/ipu-di.c |  2 +-
>  drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c   | 25 -
>  drivers/staging/imx-drm/ipu-v3/ipu-dp.c | 71 
>  drivers/staging/imx-drm/ipu-v3/ipu-prv.h|  3 +
>  drivers/staging/imx-drm/ipuv3-crtc.c| 16 --
>  drivers/staging/imx-drm/ipuv3-plane.c   |  4 ++
>  9 files changed, 193 insertions(+), 59 deletions(-)
> 
> through these changes:
> 
> Denis Carikli (1):
>   imx-drm: match ipu_di_signal_cfg's clk_pol with its description.
> 
> Philipp Zabel (8):
>   imx-drm: ipu-common: add ipu_map_irq to request non-IDMAC interrupts
>   imx-drm: ipu-common: add helpers to check for a busy IDMAC channel and 
> to busywait for an interrupt
>   imx-drm: ipu-dmfc: wait for FIFOs to run empty before disabling
>   imx-drm: ipu-dc: wait for DC_FC_1 / DP_SF_END interrupt
>   imx-drm: ipu-dp: split disabling the DP foreground channel from 
> disabling the DP module
>   imx-drm: imx-dp: when disabling the DP foreground channel, wait until 
> the DP background channel is finished before disabling the IDMAC channel
>   imx-drm: ipuv3-crtc: change display enable/disable order
>   imx-drm: ipu-dc: disable DC module when not in use
> 
> Many thanks.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0/4] staging: comedi: addi_apci_1564: Further cleanups

2014-05-06 Thread Ian Abbott

On 2014-05-03 08:54, Chase Southwood wrote:

Latest patchset in a continuing cleanup of addi_apci_1564.c.  Main focus
is on the auto_attach() function, but also cleaning up some of the old addi
common code wrappers.

To be applied on top of my prior patchset to this file (the one beginning
with [PATCH 1/6] staging: comedi: addi_apci_1564: remove eeprom support code)

Chase Southwood (4):
   staging: comedi: addi_apci_1564: board has 32 digital outputs
   staging: comedi: addi_apci_1564: don't allocate unused subdevices
   staging: comedi: addi_apci_1564: absorb apci1564_reset()
   staging: comedi: addi_apci_1564: call apci1564_interrupt() directly

  .../comedi/drivers/addi-data/hwdrv_apci1564.c  | 32 ---
  drivers/staging/comedi/drivers/addi_apci_1564.c| 98 ++
  2 files changed, 45 insertions(+), 85 deletions(-)


Thumbs up from me too!

Reviewed-by: Ian Abbott 

--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 00/20] staging: comedi: adl_pci9118: cleanup the private data

2014-05-06 Thread Ian Abbott

On 2014-05-05 17:35, H Hartley Sweeten wrote:

Remove the unused or unnecessary members from the private data.

H Hartley Sweeten (20):
   staging: comedi: adl_pci9118: remove 'ai_n_chan' from private data
   staging: comedi: adl_pci9118: remove 'ai_chanlist' from private data
   staging: comedi: adl_pci9118: remove 'ai_data_len' from private data
   staging: comedi: adl_pci9118: remove 'ai_timer1' from private data
   staging: comedi: adl_pci9118: remove 'ai_timer2' from private data
   staging: comedi: adl_pci9118: remove 'ai_n_scanlen' from private data
   staging: comedi: adl_pci9118: remove 'i8254_osc_base' from private data
   staging: comedi: adl_pci9118: remove 'ai_scans' from private data
   staging: comedi: adl_pci9118: remove 'usessh' from private data
   staging: comedi: adl_pci9118: cmd->stop_src == TRIG_INT is not supported
   staging: comedi: adl_pci9118: remove 'ai_buf_ptr' from private data
   staging: comedi: adl_pci9118: remove 'valid' from private data
   staging: comedi: adl_pci9118: remove 'cnt0_users' from private data
   staging: comedi: adl_pci9118: remove 'useeoshandle' from private data
   staging: comedi: adl_pci9118: remove 'ai16bits' from private data
   staging: comedi: adl_pci9118: remove 'int_ai_func' from private data
   staging: comedi: adl_pci9118: tidy up interrupt_pci9118()
   staging: comedi: adl_pci9118: tidy up start_pacer()
   staging: comedi: adl_pci9118: remove 'cnt0_divisor' from private data
   staging: comedi: adl_pci9118: remove 'dmabuf_samples' from private data

  drivers/staging/comedi/drivers/adl_pci9118.c | 365 ++-
  1 file changed, 130 insertions(+), 235 deletions(-)



Looks good!

Reviewed-by: Ian Abbott 


--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: comedi: adl_pc19111: remove 'continuous' from subdevice private data

2014-05-06 Thread Ian Abbott

On 2014-05-05 17:48, H Hartley Sweeten wrote:

This member of the subdevice private data can be determined from the
cmd->stop_src. Do that instead.

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---
  drivers/staging/comedi/drivers/amplc_dio200_common.c | 18 +-
  1 file changed, 5 insertions(+), 13 deletions(-)


The patch doesn't match the description (different module).  Maybe some 
bleed-over from a different patch series?


--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0/4] staging: comedi: adl_pc19111: cleanup the private data

2014-05-06 Thread Ian Abbott

On 2014-05-05 17:48, H Hartley Sweeten wrote:

Remove the unused or unnecessary members from the private data.

H Hartley Sweeten (4):
   staging: comedi: adl_pc19111: remove 'stop_is_none' from private data
   staging: comedi: adl_pc19111: rename 'async_cmd' variable in (*do_cmd)
   staging: comedi: adl_pc19111: remove 'chanlist_len' from private data
   staging: comedi: adl_pc19111: remove 'continuous' from subdevice private data

  drivers/staging/comedi/drivers/adl_pci9111.c   | 57 +-
  .../staging/comedi/drivers/amplc_dio200_common.c   | 18 ++-
  2 files changed, 29 insertions(+), 46 deletions(-)



The first three patches look fine.  The fourth seems to be for an 
unrelated module.


Reviewed-by: Ian Abbott 
for patches 1 to 3.

--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 05/24] staging: comedi: amplc_pci224: use comedi_fc helpers to validate timer args

2014-05-06 Thread Ian Abbott

On 2014-05-05 17:59, H Hartley Sweeten wrote:

Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the
scan_begin_arg when the scan_begin_src is TRIG_TIMER.

For aesthetics reasons, rename the local variable 'tmp' to 'arg'.

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---
  drivers/staging/comedi/drivers/amplc_pci224.c | 29 +--
  1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c 
b/drivers/staging/comedi/drivers/amplc_pci224.c
index c2b352c..ec65a34 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -719,7 +719,7 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct 
comedi_subdevice *s,
  {
struct pci224_private *devpriv = dev->private;
int err = 0;
-   unsigned int tmp;
+   unsigned int arg;

/* Step 1 : check if triggers are trivially valid */

@@ -746,14 +746,14 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct 
comedi_subdevice *s,
 * There's only one external trigger signal (which makes these
 * tests easier).  Only one thing can use it.
 */
-   tmp = 0;
+   err = 0;
if (cmd->start_src & TRIG_EXT)
-   tmp++;
+   err++;
if (cmd->scan_begin_src & TRIG_EXT)
-   tmp++;
+   err++;
if (cmd->stop_src & TRIG_EXT)
-   tmp++;
-   if (tmp > 1)
+   err++;
+   if (err > 1)
err |= -EINVAL;

if (err)


That's wrong and breaks when any of the _src are set to TRIG_EXT.  It 
also disregards any errors from step 2a.  It would have worked if you 
had just replaced 'tmp' with 'arg' in the original version.



@@ -761,6 +761,7 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct 
comedi_subdevice *s,

/* Step 3: check if arguments are trivially valid */

+   err = 0;


And then clearing 'err' would have been unnecessary here.

--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 00/24] staging: comedi: cleanup timer arg validation

2014-05-06 Thread Ian Abbott

On 2014-05-05 17:59, H Hartley Sweeten wrote:

Use the comedi_fc helpers to validate the timer arguments.

H Hartley Sweeten (24):
   staging: comedi: adl_pci9111: use comedi_fc helpers to validate timer args
   staging: comedi: adv_pci1710: use comedi_fc helpers to validate timer args
   staging: comedi: dt3000: use comedi_fc helpers to validate timer args
   staging: comedi: adl_pci9118: use comedi_fc helpers to validate timer args
   staging: comedi: amplc_pci224: use comedi_fc helpers to validate timer args
   staging: comedi: cb_pcidas: use comedi_fc helpers to validate timer args
   staging: comedi: comedi_test: use comedi_fc helpers to validate timer args
   staging: comedi: das16: use comedi_fc helpers to validate timer args
   staging: comedi: das16m1: use comedi_fc helpers to validate timer args
   staging: comedi: das800: use comedi_fc helpers to validate timer args
   staging: comedi: dmm32at: use comedi_fc helpers to validate timer args
   staging: comedi: dt2814: use comedi_fc helpers to validate timer arg
   staging: comedi: dt282x: use comedi_fc helpers to validate timer args
   staging: comedi: ni_at_a2150: use comedi_fc helpers to validate timer arg
   staging: comedi: ni_pcidio: use comedi_fc helpers to validate timer arg
   staging: comedi: pcl711: use comedi_fc helpers to validate timer arg
   staging: comedi: pcl812: use comedi_fc helpers to validate timer arg
   staging: comedi: pcl816: use comedi_fc helpers to validate timer arg
   staging: comedi: pcl818: use comedi_fc helpers to validate timer arg
   staging: comedi: quatech_daqp_cs: use comedi_fc helpers to validate timer 
args
   staging: comedi: rtd520: use comedi_fc helpers to validate timer args
   staging: comedi: s626: use comedi_fc helpers to validate timer args
   staging: comedi: skel: use comedi_fc helpers to validate timer args
   staging: comedi: addi_apci_3xxx: use comedi_fc helpers to validate timer arg

  drivers/staging/comedi/drivers/addi_apci_3xxx.c  | 10 +++---
  drivers/staging/comedi/drivers/adl_pci9111.c | 10 ++
  drivers/staging/comedi/drivers/adl_pci9118.c | 45 
  drivers/staging/comedi/drivers/adv_pci1710.c | 11 +++---
  drivers/staging/comedi/drivers/amplc_pci224.c| 29 ---
  drivers/staging/comedi/drivers/cb_pcidas.c   | 25 ++---
  drivers/staging/comedi/drivers/comedi_test.c | 22 +---
  drivers/staging/comedi/drivers/das16.c   | 32 -
  drivers/staging/comedi/drivers/das16m1.c | 11 +++---
  drivers/staging/comedi/drivers/das800.c  | 10 +++---
  drivers/staging/comedi/drivers/dmm32at.c | 29 +++
  drivers/staging/comedi/drivers/dt2814.c  |  9 +++--
  drivers/staging/comedi/drivers/dt282x.c  | 18 +-
  drivers/staging/comedi/drivers/dt3000.c  | 29 +++
  drivers/staging/comedi/drivers/ni_at_a2150.c |  9 +++--
  drivers/staging/comedi/drivers/ni_pcidio.c   | 10 +++---
  drivers/staging/comedi/drivers/pcl711.c  | 10 +++---
  drivers/staging/comedi/drivers/pcl812.c  | 11 +++---
  drivers/staging/comedi/drivers/pcl816.c  | 11 +++---
  drivers/staging/comedi/drivers/pcl818.c  | 11 +++---
  drivers/staging/comedi/drivers/quatech_daqp_cs.c | 18 --
  drivers/staging/comedi/drivers/rtd520.c  | 32 +++--
  drivers/staging/comedi/drivers/s626.c| 36 +--
  drivers/staging/comedi/drivers/skel.c| 29 +++
  24 files changed, 192 insertions(+), 275 deletions(-)



All okay except for patch 05 which can be skipped without affecting the 
subsequent patches.


Reviewed-by: Ian Abbott 
for patches 01-04, 06-24.

--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


GLUCKWUNGLÜCKWUNSCH AN SIE ($4.500.000,00 USD)

2014-05-06 Thread UNITED STATES LOTTO
UNITED STATES OF AMERICA LOTTO INC.
ADRESSE: LANDSDOWN
STADT: St NORTH BETHESDA
STATE/PROVINCE: MARYLAND
POSTCODE: 20852
LAND: USA
INC.

REF NR.:525743970

STAPEL NR.:6474869989/603

LOTTO GEWINNER
BETR.: ENDGULTIGE NOTIFIKATION
GLUCKWUNSCHE!

Die Vereinigten Staaten Lottery Inc: Wir sind erfreut, offiziell mitteilen zu 
können,
dass Ihre E-Mail-Adresse ist die Summe von $4.500.000,00 USD gewann heute 
gewesen 5 Mai
2014. Sie sollten der National Westminster Bank Plc mit folgenden Daten 
kontaktieren.

National Westminster Bank Plc
BUNDESREPUBLIK DEUTSCHLAND PAYMENT ZENTRUM
Ansprechpartner: Dr. Peter Cox & Dr Collins Daniel
# 135 Bishopsgate London EC2M 3UR
London, United Kingdom.
E-mail: postcashp...@post.com

Um Ihren Preis wert Summe von $4.500.000,00 USD behaupten, sollten Sie in Ihrem 
genaue
Daten zu füllen, wie unten an und übermittelt ihn unverzüglich die 
erforderlichen
National Westminster Bank Plc, Bundesrepublik Deutschland Zahlung per e-mail:
postcashp...@post.com

{UNITED STATES Lottogewinner ANTRAG AUF ZAHLUNG}.
** *
VORNAME __
NAMEN 
GEBURT ___
SEX _
ADRESSE _
NATIONALITY _
JOB _
TELEFONNUMMER 
Faxnummer __
Gewonnene Betrag __

REF NR.:525743970

STAPEL NR.:6474869989/603

GENEHMIGT FUER ZAHLUNG
*
NOTIZ
**
Registereintragung:
Amtsgericht Hamburg BDW 9243
Vorsitzender des Aufsichtsrats:
Dipl.-Ing. Dr.-Ing. E.h.
Sven IngelmannVorstand:
Peter Wilde   
(Vorsitzender)
Jochen Karl 


-- 
Esta mensagem foi verificada pelo sistema de antiv�rus e
 acredita-se estar livre de perigo.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


GLUCKWUNGLÜCKWUNSCH AN SIE ($4.500.000,00 USD)

2014-05-06 Thread UNITED STATES LOTTO
UNITED STATES OF AMERICA LOTTO INC.
ADRESSE: LANDSDOWN
STADT: St NORTH BETHESDA
STATE/PROVINCE: MARYLAND
POSTCODE: 20852
LAND: USA
INC.

REF NR.:525743970

STAPEL NR.:6474869989/603

LOTTO GEWINNER
BETR.: ENDGULTIGE NOTIFIKATION
GLUCKWUNSCHE!

Die Vereinigten Staaten Lottery Inc: Wir sind erfreut, offiziell mitteilen zu 
können,
dass Ihre E-Mail-Adresse ist die Summe von $4.500.000,00 USD gewann heute 
gewesen 5 Mai
2014. Sie sollten der National Westminster Bank Plc mit folgenden Daten 
kontaktieren.

National Westminster Bank Plc
BUNDESREPUBLIK DEUTSCHLAND PAYMENT ZENTRUM
Ansprechpartner: Dr. Peter Cox & Dr Collins Daniel
# 135 Bishopsgate London EC2M 3UR
London, United Kingdom.
E-mail: postcashp...@post.com

Um Ihren Preis wert Summe von $4.500.000,00 USD behaupten, sollten Sie in Ihrem 
genaue
Daten zu füllen, wie unten an und übermittelt ihn unverzüglich die 
erforderlichen
National Westminster Bank Plc, Bundesrepublik Deutschland Zahlung per e-mail:
postcashp...@post.com

{UNITED STATES Lottogewinner ANTRAG AUF ZAHLUNG}.
** *
VORNAME __
NAMEN 
GEBURT ___
SEX _
ADRESSE _
NATIONALITY _
JOB _
TELEFONNUMMER 
Faxnummer __
Gewonnene Betrag __

REF NR.:525743970

STAPEL NR.:6474869989/603

GENEHMIGT FUER ZAHLUNG
*
NOTIZ
**
Registereintragung:
Amtsgericht Hamburg BDW 9243
Vorsitzender des Aufsichtsrats:
Dipl.-Ing. Dr.-Ing. E.h.
Sven IngelmannVorstand:
Peter Wilde   
(Vorsitzender)
Jochen Karl 


-- 
Esta mensagem foi verificada pelo sistema de antiv�rus e
 acredita-se estar livre de perigo.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


GLUCKWUNGLÜCKWUNSCH AN SIE ($4.500.000,00 USD)

2014-05-06 Thread UNITED STATES LOTTO
UNITED STATES OF AMERICA LOTTO INC.
ADRESSE: LANDSDOWN
STADT: St NORTH BETHESDA
STATE/PROVINCE: MARYLAND
POSTCODE: 20852
LAND: USA
INC.

REF NR.:525743970

STAPEL NR.:6474869989/603

LOTTO GEWINNER
BETR.: ENDGULTIGE NOTIFIKATION
GLUCKWUNSCHE!

Die Vereinigten Staaten Lottery Inc: Wir sind erfreut, offiziell mitteilen zu 
können,
dass Ihre E-Mail-Adresse ist die Summe von $4.500.000,00 USD gewann heute 
gewesen 5 Mai
2014. Sie sollten der National Westminster Bank Plc mit folgenden Daten 
kontaktieren.

National Westminster Bank Plc
BUNDESREPUBLIK DEUTSCHLAND PAYMENT ZENTRUM
Ansprechpartner: Dr. Peter Cox & Dr Collins Daniel
# 135 Bishopsgate London EC2M 3UR
London, United Kingdom.
E-mail: postcashp...@post.com

Um Ihren Preis wert Summe von $4.500.000,00 USD behaupten, sollten Sie in Ihrem 
genaue
Daten zu füllen, wie unten an und übermittelt ihn unverzüglich die 
erforderlichen
National Westminster Bank Plc, Bundesrepublik Deutschland Zahlung per e-mail:
postcashp...@post.com

{UNITED STATES Lottogewinner ANTRAG AUF ZAHLUNG}.
** *
VORNAME __
NAMEN 
GEBURT ___
SEX _
ADRESSE _
NATIONALITY _
JOB _
TELEFONNUMMER 
Faxnummer __
Gewonnene Betrag __

REF NR.:525743970

STAPEL NR.:6474869989/603

GENEHMIGT FUER ZAHLUNG
*
NOTIZ
**
Registereintragung:
Amtsgericht Hamburg BDW 9243
Vorsitzender des Aufsichtsrats:
Dipl.-Ing. Dr.-Ing. E.h.
Sven IngelmannVorstand:
Peter Wilde   
(Vorsitzender)
Jochen Karl 


-- 
Esta mensagem foi verificada pelo sistema de antiv�rus e
 acredita-se estar livre de perigo.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


GLUCKWUNGLÜCKWUNSCH AN SIE ($4.500.000,00 USD)

2014-05-06 Thread UNITED STATES LOTTO
UNITED STATES OF AMERICA LOTTO INC.
ADRESSE: LANDSDOWN
STADT: St NORTH BETHESDA
STATE/PROVINCE: MARYLAND
POSTCODE: 20852
LAND: USA
INC.

REF NR.:525743970

STAPEL NR.:6474869989/603

LOTTO GEWINNER
BETR.: ENDGULTIGE NOTIFIKATION
GLUCKWUNSCHE!

Die Vereinigten Staaten Lottery Inc: Wir sind erfreut, offiziell mitteilen zu 
können,
dass Ihre E-Mail-Adresse ist die Summe von $4.500.000,00 USD gewann heute 
gewesen 5 Mai
2014. Sie sollten der National Westminster Bank Plc mit folgenden Daten 
kontaktieren.

National Westminster Bank Plc
BUNDESREPUBLIK DEUTSCHLAND PAYMENT ZENTRUM
Ansprechpartner: Dr. Peter Cox & Dr Collins Daniel
# 135 Bishopsgate London EC2M 3UR
London, United Kingdom.
E-mail: postcashp...@post.com

Um Ihren Preis wert Summe von $4.500.000,00 USD behaupten, sollten Sie in Ihrem 
genaue
Daten zu füllen, wie unten an und übermittelt ihn unverzüglich die 
erforderlichen
National Westminster Bank Plc, Bundesrepublik Deutschland Zahlung per e-mail:
postcashp...@post.com

{UNITED STATES Lottogewinner ANTRAG AUF ZAHLUNG}.
** *
VORNAME __
NAMEN 
GEBURT ___
SEX _
ADRESSE _
NATIONALITY _
JOB _
TELEFONNUMMER 
Faxnummer __
Gewonnene Betrag __

REF NR.:525743970

STAPEL NR.:6474869989/603

GENEHMIGT FUER ZAHLUNG
*
NOTIZ
**
Registereintragung:
Amtsgericht Hamburg BDW 9243
Vorsitzender des Aufsichtsrats:
Dipl.-Ing. Dr.-Ing. E.h.
Sven IngelmannVorstand:
Peter Wilde   
(Vorsitzender)
Jochen Karl 


-- 
Esta mensagem foi verificada pelo sistema de antiv�rus e
 acredita-se estar livre de perigo.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 02/20] staging: comedi: pass subdevice to comedi_buf_get()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_get()` to pass a pointer to the
comedi subdevice instead of a pointer to the "async" structure belonging
to the subdevice.

The function gets a sample value from the comedi buffer, but currently
only deals with 16-bit sample types.  A future version could deal with
16 or 32-bit sample types depending on the value of the SDF_LSAMPL
subdevice flag.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c| 3 ++-
 drivers/staging/comedi/comedidev.h | 2 +-
 drivers/staging/comedi/drivers/amplc_pci230.c  | 4 ++--
 drivers/staging/comedi/drivers/ni_mio_common.c | 4 ++--
 drivers/staging/comedi/drivers/usbdux.c| 2 +-
 drivers/staging/comedi/drivers/usbduxsigma.c   | 2 +-
 6 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index f127bf9..acb042c 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -431,8 +431,9 @@ int comedi_buf_put(struct comedi_subdevice *s, unsigned 
short x)
 }
 EXPORT_SYMBOL_GPL(comedi_buf_put);
 
-int comedi_buf_get(struct comedi_async *async, unsigned short *x)
+int comedi_buf_get(struct comedi_subdevice *s, unsigned short *x)
 {
+   struct comedi_async *async = s->async;
unsigned int n = comedi_buf_read_n_available(async);
 
if (n < sizeof(short))
diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index a874c1c..d19a20c 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -344,7 +344,7 @@ unsigned int comedi_buf_read_alloc(struct comedi_async *, 
unsigned int);
 unsigned int comedi_buf_read_free(struct comedi_async *, unsigned int);
 
 int comedi_buf_put(struct comedi_subdevice *s, unsigned short x);
-int comedi_buf_get(struct comedi_async *, unsigned short *);
+int comedi_buf_get(struct comedi_subdevice *s, unsigned short *x);
 
 void comedi_buf_memcpy_to(struct comedi_async *async, unsigned int offset,
  const void *source, unsigned int num_bytes);
diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c 
b/drivers/staging/comedi/drivers/amplc_pci230.c
index 9541e24..d0740d60 100644
--- a/drivers/staging/comedi/drivers/amplc_pci230.c
+++ b/drivers/staging/comedi/drivers/amplc_pci230.c
@@ -1164,7 +1164,7 @@ static void pci230_handle_ao_nofifo(struct comedi_device 
*dev,
return;
for (i = 0; i < cmd->chanlist_len; i++) {
/* Read sample from Comedi's circular buffer. */
-   ret = comedi_buf_get(s->async, &data);
+   ret = comedi_buf_get(s, &data);
if (ret == 0) {
s->async->events |= COMEDI_CB_OVERFLOW;
pci230_ao_stop(dev, s);
@@ -1250,7 +1250,7 @@ static int pci230_handle_ao_fifo(struct comedi_device 
*dev,
for (i = 0; i < cmd->chanlist_len; i++) {
unsigned short datum;
 
-   comedi_buf_get(async, &datum);
+   comedi_buf_get(s, &datum);
pci230_ao_write_fifo(dev, datum,
 CR_CHAN(cmd->chanlist[i]));
}
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c 
b/drivers/staging/comedi/drivers/ni_mio_common.c
index 087b533..d4e99af 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -1149,7 +1149,7 @@ static void ni_ao_fifo_load(struct comedi_device *dev,
 
chan = async->cur_chan;
for (i = 0; i < n; i++) {
-   err &= comedi_buf_get(async, &d);
+   err &= comedi_buf_get(s, &d);
if (err == 0)
break;
 
@@ -1159,7 +1159,7 @@ static void ni_ao_fifo_load(struct comedi_device *dev,
packed_data = d & 0x;
/* 6711 only has 16 bit wide ao fifo */
if (board->reg_type != ni_reg_6711) {
-   err &= comedi_buf_get(async, &d);
+   err &= comedi_buf_get(s, &d);
if (err == 0)
break;
chan++;
diff --git a/drivers/staging/comedi/drivers/usbdux.c 
b/drivers/staging/comedi/drivers/usbdux.c
index 011fede..143f632 100644
--- a/drivers/staging/comedi/drivers/usbdux.c
+++ b/drivers/staging/comedi/drivers/usbdux.c
@@ -484,7 +484,7 @@ static void usbduxsub_ao_isoc_irq(struct urb *urb)
unsigned int chan = devpriv->ao_chanlist[i];
unsigned short val;

[PATCH v2 05/20] staging: comedi: ni_tiocmd: pass subdevice to command setup functions

2014-05-06 Thread Ian Abbott
The `ni_tio_input_cmd()`, `ni_tio_output_cmd()` and `ni_tio_cmd_setup()`
functions are called from `ni_tio_cmd()` to set up a comedi command.
They currently get passed two parameters, a pointer to a `struct
ni_gpct` and a pointer to a `struct comedi_async`, but both of those
come from members of a `struct comedi_subdevice` (the former from the
`private` member).  Replace the parameters with a pointer to the `struct
comedi_subdevice`.

The main motive is to make the comedi subdevice more easily available to
the functions for the use of subsequent patches to remove the `struct
comedi_async *` parameters from the comedi buffer handling functions.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/drivers/ni_tiocmd.c | 20 
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c 
b/drivers/staging/comedi/drivers/ni_tiocmd.c
index b9d23db..7a163fc 100644
--- a/drivers/staging/comedi/drivers/ni_tiocmd.c
+++ b/drivers/staging/comedi/drivers/ni_tiocmd.c
@@ -115,10 +115,12 @@ static int ni_tio_input_inttrig(struct comedi_device *dev,
return retval;
 }
 
-static int ni_tio_input_cmd(struct ni_gpct *counter, struct comedi_async 
*async)
+static int ni_tio_input_cmd(struct comedi_subdevice *s)
 {
+   struct ni_gpct *counter = s->private;
struct ni_gpct_device *counter_dev = counter->counter_dev;
unsigned cidx = counter->counter_index;
+   struct comedi_async *async = s->async;
struct comedi_cmd *cmd = &async->cmd;
int retval = 0;
 
@@ -164,9 +166,10 @@ static int ni_tio_input_cmd(struct ni_gpct *counter, 
struct comedi_async *async)
return retval;
 }
 
-static int ni_tio_output_cmd(struct ni_gpct *counter,
-struct comedi_async *async)
+static int ni_tio_output_cmd(struct comedi_subdevice *s)
 {
+   struct ni_gpct *counter = s->private;
+
dev_err(counter->counter_dev->dev->class_dev,
"output commands not yet implemented.\n");
return -ENOTSUPP;
@@ -178,9 +181,10 @@ static int ni_tio_output_cmd(struct ni_gpct *counter,
return ni_tio_arm(counter, 1, NI_GPCT_ARM_IMMEDIATE);
 }
 
-static int ni_tio_cmd_setup(struct ni_gpct *counter, struct comedi_async 
*async)
+static int ni_tio_cmd_setup(struct comedi_subdevice *s)
 {
-   struct comedi_cmd *cmd = &async->cmd;
+   struct comedi_cmd *cmd = &s->async->cmd;
+   struct ni_gpct *counter = s->private;
unsigned cidx = counter->counter_index;
int set_gate_source = 0;
unsigned gate_source;
@@ -219,12 +223,12 @@ int ni_tio_cmd(struct comedi_device *dev, struct 
comedi_subdevice *s)
"Interrupt-driven commands not yet implemented.\n");
retval = -EIO;
} else {
-   retval = ni_tio_cmd_setup(counter, async);
+   retval = ni_tio_cmd_setup(s);
if (retval == 0) {
if (cmd->flags & CMDF_WRITE)
-   retval = ni_tio_output_cmd(counter, async);
+   retval = ni_tio_output_cmd(s);
else
-   retval = ni_tio_input_cmd(counter, async);
+   retval = ni_tio_input_cmd(s);
}
}
spin_unlock_irqrestore(&counter->lock, flags);
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 03/20] staging: comedi: pass subdevice to comedi_buf_memcpy_to()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_memcpy_to()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c   | 3 ++-
 drivers/staging/comedi/comedidev.h| 2 +-
 drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c | 2 +-
 drivers/staging/comedi/drivers/comedi_fc.c| 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index acb042c..de850f3 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -445,9 +445,10 @@ int comedi_buf_get(struct comedi_subdevice *s, unsigned 
short *x)
 }
 EXPORT_SYMBOL_GPL(comedi_buf_get);
 
-void comedi_buf_memcpy_to(struct comedi_async *async, unsigned int offset,
+void comedi_buf_memcpy_to(struct comedi_subdevice *s, unsigned int offset,
  const void *data, unsigned int num_bytes)
 {
+   struct comedi_async *async = s->async;
unsigned int write_ptr = async->buf_write_ptr + offset;
 
if (write_ptr >= async->prealloc_bufsz)
diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index d19a20c..221db71 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -346,7 +346,7 @@ unsigned int comedi_buf_read_free(struct comedi_async *, 
unsigned int);
 int comedi_buf_put(struct comedi_subdevice *s, unsigned short x);
 int comedi_buf_get(struct comedi_subdevice *s, unsigned short *x);
 
-void comedi_buf_memcpy_to(struct comedi_async *async, unsigned int offset,
+void comedi_buf_memcpy_to(struct comedi_subdevice *s, unsigned int offset,
  const void *source, unsigned int num_bytes);
 void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset,
void *destination, unsigned int num_bytes);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c 
b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
index 9b8851c..51095be 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
@@ -2712,7 +2712,7 @@ static int i_APCI3200_InterruptHandleEos(struct 
comedi_device *dev)
s->async->events |= COMEDI_CB_ERROR;
}
/*  Write all 7 scan values in the comedi buffer */
-   comedi_buf_memcpy_to(s->async, 0,
+   comedi_buf_memcpy_to(s, 0,
(unsigned int *) s_BoardInfos[dev->minor].
ui_ScanValueArray, (7 + 12) * sizeof(unsigned 
int));
 
diff --git a/drivers/staging/comedi/drivers/comedi_fc.c 
b/drivers/staging/comedi/drivers/comedi_fc.c
index 9d9b146..81749a7 100644
--- a/drivers/staging/comedi/drivers/comedi_fc.c
+++ b/drivers/staging/comedi/drivers/comedi_fc.c
@@ -74,7 +74,7 @@ unsigned int cfc_write_array_to_buffer(struct 
comedi_subdevice *s,
return 0;
}
 
-   comedi_buf_memcpy_to(async, 0, data, num_bytes);
+   comedi_buf_memcpy_to(s, 0, data, num_bytes);
comedi_buf_write_free(async, num_bytes);
cfc_inc_scan_progress(s, num_bytes);
async->events |= COMEDI_CB_BLOCK;
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 00/20] staging: comedi: pass subdevice around instead of async

2014-05-06 Thread Ian Abbott
For comedi subdevices that support asynchronous commands, the `async`
member of `struct comedi_subdevice` points to a `struct comedi_async`
allocated to manage asynchronous commands on that subdevice.  The
pointer to this "async" structure is passed around by various functions
and some of those functions need to get back to the "subdevice"
structure from this pointer, so the "async" structure has a `subdevice`
member pointing back to the `struct comedi_subdevice`.

Since we can always get to the "async" structure from the "subdevice"
structure, we can just pass around the pointer to the subdevice instead
of the pointer to the async structure.  Then the `subdevice` member of
`struct comedi_async` is no longer required and can be removed.

v2: Rebased to current staging-next due to merge conflicts.  The first
two patches from v1 have already been applied, so the ordinals of
the remaining patches have been shuffled down two places.

01) staging: comedi: pass subdevice to comedi_buf_put()
02) staging: comedi: pass subdevice to comedi_buf_get()
03) staging: comedi: pass subdevice to comedi_buf_memcpy_to()
04) staging: comedi: pass subdevice to comedi_buf_memcpy_from()
05) staging: comedi: ni_tiocmd: pass subdevice to command setup
functions
06) staging: comedi: pass subdevice to comedi_buf_write_alloc()
07) staging: comedi: pass subdevice to comedi_buf_write_free()
08) staging: comedi: pass subdevice to comedi_buf_write_n_allocated()
09) staging: comedi: pass subdevice to comedi_buf_read_alloc()
10) staging: comedi: pass subdevice to comedi_buf_read_free()
11) staging: comedi: pass subdevice to comedi_buf_read_n_available()
12) staging: comedi: pass subdevice to comedi_buf_reset()
13) staging: comedi: pass subdevice to comedi_buf_is_mmapped()
14) staging: comedi: pass subdevice to comedi_buf_munge()
15) staging: comedi: pass subdevice to __comedi_buf_write_alloc()
16) staging: comedi: pass subdevice to comedi_buf_write_n_available()
17) staging: comedi: mite: pass subdevice to mite_buf_change()
18) staging: comedi: mite: pass subdevice to mite_sync_input_dma()
19) staging: comedi: mite: pass subdevice to mite_sync_output_dma()
20) staging: comedi: remove subdevice member of struct comedi_async

 drivers/staging/comedi/comedi_buf.c| 66 +-
 drivers/staging/comedi/comedi_fops.c   | 36 ++--
 drivers/staging/comedi/comedi_internal.h   |  6 +-
 drivers/staging/comedi/comedidev.h | 20 +++
 drivers/staging/comedi/drivers.c   |  1 -
 drivers/staging/comedi/drivers/8255.c  |  2 +-
 .../comedi/drivers/addi-data/hwdrv_apci3120.c  |  2 +-
 .../comedi/drivers/addi-data/hwdrv_apci3200.c  |  7 +--
 drivers/staging/comedi/drivers/addi_apci_1032.c|  2 +-
 drivers/staging/comedi/drivers/addi_apci_2032.c|  2 +-
 drivers/staging/comedi/drivers/addi_apci_3xxx.c|  2 +-
 drivers/staging/comedi/drivers/adv_pci1710.c   |  4 +-
 .../staging/comedi/drivers/amplc_dio200_common.c   |  2 +-
 drivers/staging/comedi/drivers/amplc_pc236.c   |  2 +-
 drivers/staging/comedi/drivers/amplc_pci224.c  |  2 +-
 drivers/staging/comedi/drivers/amplc_pci230.c  |  8 +--
 drivers/staging/comedi/drivers/cb_pcidas64.c   |  2 +-
 drivers/staging/comedi/drivers/comedi_fc.c | 16 +++---
 drivers/staging/comedi/drivers/comedi_parport.c|  2 +-
 drivers/staging/comedi/drivers/dmm32at.c   |  8 +--
 drivers/staging/comedi/drivers/dt282x.c|  2 +-
 drivers/staging/comedi/drivers/dt3000.c|  2 +-
 drivers/staging/comedi/drivers/me4000.c|  4 +-
 drivers/staging/comedi/drivers/mite.c  | 26 -
 drivers/staging/comedi/drivers/mite.h  |  6 +-
 drivers/staging/comedi/drivers/ni_6527.c   |  2 +-
 drivers/staging/comedi/drivers/ni_65xx.c   |  2 +-
 drivers/staging/comedi/drivers/ni_660x.c   |  6 +-
 drivers/staging/comedi/drivers/ni_atmio16d.c   |  2 +-
 drivers/staging/comedi/drivers/ni_mio_common.c | 20 +++
 drivers/staging/comedi/drivers/ni_pcidio.c | 12 ++--
 drivers/staging/comedi/drivers/ni_pcimio.c | 10 ++--
 drivers/staging/comedi/drivers/ni_tiocmd.c | 24 
 drivers/staging/comedi/drivers/pcl711.c|  2 +-
 drivers/staging/comedi/drivers/pcl726.c|  2 +-
 drivers/staging/comedi/drivers/pcl812.c|  4 +-
 drivers/staging/comedi/drivers/pcl816.c|  2 +-
 drivers/staging/comedi/drivers/pcl818.c|  6 +-
 drivers/staging/comedi/drivers/pcmmio.c|  4 +-
 drivers/staging/comedi/drivers/pcmuio.c|  4 +-
 drivers/staging/comedi/drivers/quatech_daqp_cs.c   |  2 +-
 drivers/staging/comedi/drivers/rtd520.c|  4 +-
 drivers/staging/comedi/drivers/s626.c  |  1 -
 drivers/staging/comedi/drivers/usbdux.c|  4 +-
 drivers/staging/comedi/drivers/usbduxsigma.c   |  2

[PATCH v2 06/20] staging: comedi: pass subdevice to comedi_buf_write_alloc()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_write_alloc()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c   | 4 ++--
 drivers/staging/comedi/comedi_fops.c  | 6 +++---
 drivers/staging/comedi/comedidev.h| 2 +-
 drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c | 3 +--
 drivers/staging/comedi/drivers/comedi_fc.c| 2 +-
 drivers/staging/comedi/drivers/mite.c | 2 +-
 drivers/staging/comedi/drivers/ni_mio_common.c| 2 +-
 drivers/staging/comedi/drivers/ni_pcidio.c| 2 +-
 drivers/staging/comedi/drivers/ni_tiocmd.c| 2 +-
 9 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index 199ebb4..6a65500 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -269,10 +269,10 @@ static unsigned int __comedi_buf_write_alloc(struct 
comedi_async *async,
 }
 
 /* allocates chunk for the writer from free buffer space */
-unsigned int comedi_buf_write_alloc(struct comedi_async *async,
+unsigned int comedi_buf_write_alloc(struct comedi_subdevice *s,
unsigned int nbytes)
 {
-   return __comedi_buf_write_alloc(async, nbytes, 0);
+   return __comedi_buf_write_alloc(s->async, nbytes, 0);
 }
 EXPORT_SYMBOL_GPL(comedi_buf_write_alloc);
 
diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 0affd1f..58c1f6e 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -1004,7 +1004,7 @@ static int do_bufinfo_ioctl(struct comedi_device *dev,
 
if (bi.bytes_written && (s->subdev_flags & SDF_CMD_WRITE)) {
bi.bytes_written =
-   comedi_buf_write_alloc(async, bi.bytes_written);
+   comedi_buf_write_alloc(s, bi.bytes_written);
comedi_buf_write_free(async, bi.bytes_written);
}
 
@@ -2038,7 +2038,7 @@ static unsigned int comedi_poll(struct file *file, 
poll_table *wait)
unsigned int bps = bytes_per_sample(s);
 
poll_wait(file, &s->async->wait_head, wait);
-   comedi_buf_write_alloc(s->async, s->async->prealloc_bufsz);
+   comedi_buf_write_alloc(s, s->async->prealloc_bufsz);
if (!s->busy || !comedi_is_subdevice_running(s) ||
comedi_buf_write_n_allocated(s->async) >= bps)
mask |= POLLOUT | POLLWRNORM;
@@ -2136,7 +2136,7 @@ static ssize_t comedi_write(struct file *file, const char 
__user *buf,
m = n;
if (async->buf_write_ptr + m > async->prealloc_bufsz)
m = async->prealloc_bufsz - async->buf_write_ptr;
-   comedi_buf_write_alloc(async, async->prealloc_bufsz);
+   comedi_buf_write_alloc(s, async->prealloc_bufsz);
if (m > comedi_buf_write_n_allocated(async))
m = comedi_buf_write_n_allocated(async);
if (m < n)
diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index 0a68006..b47cc96 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -336,7 +336,7 @@ static inline unsigned int bytes_per_sample(const struct 
comedi_subdevice *subd)
  */
 int comedi_set_hw_dev(struct comedi_device *dev, struct device *hw_dev);
 
-unsigned int comedi_buf_write_alloc(struct comedi_async *, unsigned int);
+unsigned int comedi_buf_write_alloc(struct comedi_subdevice *s, unsigned int 
n);
 unsigned int comedi_buf_write_free(struct comedi_async *, unsigned int);
 
 unsigned int comedi_buf_read_n_available(struct comedi_async *);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c 
b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
index 51095be..246220a 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
@@ -2702,8 +2702,7 @@ static int i_APCI3200_InterruptHandleEos(struct 
comedi_device *dev)
s->async->events |= COMEDI_CB_EOS;
 
/*  Test if enougth memory is available and allocate it 
for 7 values */
-   /* n = comedi_buf_write_alloc(s->async, 
7*sizeof(unsigned int)); */
-   n = comedi_buf_write_alloc(s->async,
+   n = comedi_buf_write_alloc(s,
(7 + 12) * sizeof(unsigned int));
 
/*  If not e

[PATCH v2 01/20] staging: comedi: pass subdevice to comedi_buf_put()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_put()` to pass a pointer to the
comedi subdevice instead of a pointer to the "async" structure belonging
to the subdevice.

The function puts a sample value in the comedi buffer, but currently
only deals with 16-bit sample types.  A future version could deal with
16 or 32-bit sample types depending on the value of the SDF_LSAMPL
subdevice flag.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c   | 3 ++-
 drivers/staging/comedi/comedidev.h| 2 +-
 drivers/staging/comedi/drivers/8255.c | 2 +-
 drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 2 +-
 drivers/staging/comedi/drivers/addi_apci_1032.c   | 2 +-
 drivers/staging/comedi/drivers/addi_apci_2032.c   | 2 +-
 drivers/staging/comedi/drivers/addi_apci_3xxx.c   | 2 +-
 drivers/staging/comedi/drivers/adv_pci1710.c  | 4 ++--
 drivers/staging/comedi/drivers/amplc_dio200_common.c  | 2 +-
 drivers/staging/comedi/drivers/amplc_pc236.c  | 2 +-
 drivers/staging/comedi/drivers/amplc_pci230.c | 2 +-
 drivers/staging/comedi/drivers/comedi_parport.c   | 2 +-
 drivers/staging/comedi/drivers/dmm32at.c  | 8 +---
 drivers/staging/comedi/drivers/dt282x.c   | 2 +-
 drivers/staging/comedi/drivers/dt3000.c   | 2 +-
 drivers/staging/comedi/drivers/me4000.c   | 4 ++--
 drivers/staging/comedi/drivers/ni_6527.c  | 2 +-
 drivers/staging/comedi/drivers/ni_65xx.c  | 2 +-
 drivers/staging/comedi/drivers/ni_atmio16d.c  | 2 +-
 drivers/staging/comedi/drivers/ni_pcidio.c| 4 ++--
 drivers/staging/comedi/drivers/pcl711.c   | 2 +-
 drivers/staging/comedi/drivers/pcl726.c   | 2 +-
 drivers/staging/comedi/drivers/pcl812.c   | 4 ++--
 drivers/staging/comedi/drivers/pcl816.c   | 2 +-
 drivers/staging/comedi/drivers/pcl818.c   | 6 +++---
 drivers/staging/comedi/drivers/pcmmio.c   | 4 ++--
 drivers/staging/comedi/drivers/pcmuio.c   | 4 ++--
 drivers/staging/comedi/drivers/quatech_daqp_cs.c  | 2 +-
 drivers/staging/comedi/drivers/rtd520.c   | 4 ++--
 drivers/staging/comedi/drivers/s626.c | 1 -
 drivers/staging/comedi/drivers/usbdux.c   | 2 +-
 31 files changed, 40 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index 2575950..f127bf9 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -416,8 +416,9 @@ unsigned int comedi_buf_read_free(struct comedi_async 
*async,
 }
 EXPORT_SYMBOL_GPL(comedi_buf_read_free);
 
-int comedi_buf_put(struct comedi_async *async, unsigned short x)
+int comedi_buf_put(struct comedi_subdevice *s, unsigned short x)
 {
+   struct comedi_async *async = s->async;
unsigned int n = __comedi_buf_write_alloc(async, sizeof(short), 1);
 
if (n < sizeof(short)) {
diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index d46123a..a874c1c 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -343,7 +343,7 @@ unsigned int comedi_buf_read_n_available(struct 
comedi_async *);
 unsigned int comedi_buf_read_alloc(struct comedi_async *, unsigned int);
 unsigned int comedi_buf_read_free(struct comedi_async *, unsigned int);
 
-int comedi_buf_put(struct comedi_async *, unsigned short);
+int comedi_buf_put(struct comedi_subdevice *s, unsigned short x);
 int comedi_buf_get(struct comedi_async *, unsigned short *);
 
 void comedi_buf_memcpy_to(struct comedi_async *async, unsigned int offset,
diff --git a/drivers/staging/comedi/drivers/8255.c 
b/drivers/staging/comedi/drivers/8255.c
index 1d53e24..46113a3 100644
--- a/drivers/staging/comedi/drivers/8255.c
+++ b/drivers/staging/comedi/drivers/8255.c
@@ -117,7 +117,7 @@ void subdev_8255_interrupt(struct comedi_device *dev,
d = spriv->io(0, _8255_DATA, 0, iobase);
d |= (spriv->io(0, _8255_DATA + 1, 0, iobase) << 8);
 
-   comedi_buf_put(s->async, d);
+   comedi_buf_put(s, d);
s->async->events |= COMEDI_CB_EOS;
 
comedi_event(dev, s);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c 
b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
index e3aa897..764c8f1 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
@@ -1520,7 +1520,7 @@ static int apci3120_interrupt_handle_eos(struct 
comedi_device *dev)
n_chan = de

[PATCH v2 08/20] staging: comedi: pass subdevice to comedi_buf_write_n_allocated()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_write_n_allocated()` to pass a
pointer to the comedi subdevice instead of a pointer to the "async"
structure belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c  | 6 --
 drivers/staging/comedi/comedi_fops.c | 6 +++---
 drivers/staging/comedi/comedi_internal.h | 2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index 2208168..ac498e0 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -323,8 +323,10 @@ static unsigned int comedi_buf_munge(struct comedi_async 
*async,
return count;
 }
 
-unsigned int comedi_buf_write_n_allocated(struct comedi_async *async)
+unsigned int comedi_buf_write_n_allocated(struct comedi_subdevice *s)
 {
+   struct comedi_async *async = s->async;
+
return async->buf_write_alloc_count - async->buf_write_count;
 }
 
@@ -333,7 +335,7 @@ unsigned int comedi_buf_write_free(struct comedi_subdevice 
*s,
   unsigned int nbytes)
 {
struct comedi_async *async = s->async;
-   unsigned int allocated = comedi_buf_write_n_allocated(async);
+   unsigned int allocated = comedi_buf_write_n_allocated(s);
 
if (nbytes > allocated)
nbytes = allocated;
diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index c7010b31..bc93863 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2040,7 +2040,7 @@ static unsigned int comedi_poll(struct file *file, 
poll_table *wait)
poll_wait(file, &s->async->wait_head, wait);
comedi_buf_write_alloc(s, s->async->prealloc_bufsz);
if (!s->busy || !comedi_is_subdevice_running(s) ||
-   comedi_buf_write_n_allocated(s->async) >= bps)
+   comedi_buf_write_n_allocated(s) >= bps)
mask |= POLLOUT | POLLWRNORM;
}
 
@@ -2137,8 +2137,8 @@ static ssize_t comedi_write(struct file *file, const char 
__user *buf,
if (async->buf_write_ptr + m > async->prealloc_bufsz)
m = async->prealloc_bufsz - async->buf_write_ptr;
comedi_buf_write_alloc(s, async->prealloc_bufsz);
-   if (m > comedi_buf_write_n_allocated(async))
-   m = comedi_buf_write_n_allocated(async);
+   if (m > comedi_buf_write_n_allocated(s))
+   m = comedi_buf_write_n_allocated(s);
if (m < n)
n = m;
 
diff --git a/drivers/staging/comedi/comedi_internal.h 
b/drivers/staging/comedi/comedi_internal.h
index a492f2d..36e7a99 100644
--- a/drivers/staging/comedi/comedi_internal.h
+++ b/drivers/staging/comedi/comedi_internal.h
@@ -21,7 +21,7 @@ void comedi_buf_map_get(struct comedi_buf_map *bm);
 int comedi_buf_map_put(struct comedi_buf_map *bm);
 struct comedi_buf_map *comedi_buf_map_from_subdev_get(
struct comedi_subdevice *s);
-unsigned int comedi_buf_write_n_allocated(struct comedi_async *async);
+unsigned int comedi_buf_write_n_allocated(struct comedi_subdevice *s);
 void comedi_device_cancel_all(struct comedi_device *dev);
 
 extern unsigned int comedi_default_buf_size_kb;
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 04/20] staging: comedi: pass subdevice to comedi_buf_memcpy_from()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_memcpy_from()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c| 3 ++-
 drivers/staging/comedi/comedidev.h | 2 +-
 drivers/staging/comedi/drivers/comedi_fc.c | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index de850f3..199ebb4 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -472,10 +472,11 @@ void comedi_buf_memcpy_to(struct comedi_subdevice *s, 
unsigned int offset,
 }
 EXPORT_SYMBOL_GPL(comedi_buf_memcpy_to);
 
-void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset,
+void comedi_buf_memcpy_from(struct comedi_subdevice *s, unsigned int offset,
void *dest, unsigned int nbytes)
 {
void *src;
+   struct comedi_async *async = s->async;
unsigned int read_ptr = async->buf_read_ptr + offset;
 
if (read_ptr >= async->prealloc_bufsz)
diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index 221db71..0a68006 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -348,7 +348,7 @@ int comedi_buf_get(struct comedi_subdevice *s, unsigned 
short *x);
 
 void comedi_buf_memcpy_to(struct comedi_subdevice *s, unsigned int offset,
  const void *source, unsigned int num_bytes);
-void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset,
+void comedi_buf_memcpy_from(struct comedi_subdevice *s, unsigned int offset,
void *destination, unsigned int num_bytes);
 
 /* drivers.c - general comedi driver functions */
diff --git a/drivers/staging/comedi/drivers/comedi_fc.c 
b/drivers/staging/comedi/drivers/comedi_fc.c
index 81749a7..5eff9d1 100644
--- a/drivers/staging/comedi/drivers/comedi_fc.c
+++ b/drivers/staging/comedi/drivers/comedi_fc.c
@@ -92,7 +92,7 @@ unsigned int cfc_read_array_from_buffer(struct 
comedi_subdevice *s,
return 0;
 
num_bytes = comedi_buf_read_alloc(async, num_bytes);
-   comedi_buf_memcpy_from(async, 0, data, num_bytes);
+   comedi_buf_memcpy_from(s, 0, data, num_bytes);
comedi_buf_read_free(async, num_bytes);
cfc_inc_scan_progress(s, num_bytes);
async->events |= COMEDI_CB_BLOCK;
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 07/20] staging: comedi: pass subdevice to comedi_buf_write_free()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_write_free()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c   | 5 +++--
 drivers/staging/comedi/comedi_fops.c  | 4 ++--
 drivers/staging/comedi/comedidev.h| 2 +-
 drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c | 2 +-
 drivers/staging/comedi/drivers/comedi_fc.c| 2 +-
 drivers/staging/comedi/drivers/mite.c | 2 +-
 6 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index 6a65500..2208168 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -329,9 +329,10 @@ unsigned int comedi_buf_write_n_allocated(struct 
comedi_async *async)
 }
 
 /* transfers a chunk from writer to filled buffer space */
-unsigned int comedi_buf_write_free(struct comedi_async *async,
+unsigned int comedi_buf_write_free(struct comedi_subdevice *s,
   unsigned int nbytes)
 {
+   struct comedi_async *async = s->async;
unsigned int allocated = comedi_buf_write_n_allocated(async);
 
if (nbytes > allocated)
@@ -426,7 +427,7 @@ int comedi_buf_put(struct comedi_subdevice *s, unsigned 
short x)
return 0;
}
*(unsigned short *)(async->prealloc_buf + async->buf_write_ptr) = x;
-   comedi_buf_write_free(async, sizeof(short));
+   comedi_buf_write_free(s, sizeof(short));
return 1;
 }
 EXPORT_SYMBOL_GPL(comedi_buf_put);
diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 58c1f6e..c7010b31 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -1005,7 +1005,7 @@ static int do_bufinfo_ioctl(struct comedi_device *dev,
if (bi.bytes_written && (s->subdev_flags & SDF_CMD_WRITE)) {
bi.bytes_written =
comedi_buf_write_alloc(s, bi.bytes_written);
-   comedi_buf_write_free(async, bi.bytes_written);
+   comedi_buf_write_free(s, bi.bytes_written);
}
 
 copyback_position:
@@ -2167,7 +2167,7 @@ static ssize_t comedi_write(struct file *file, const char 
__user *buf,
n -= m;
retval = -EFAULT;
}
-   comedi_buf_write_free(async, n);
+   comedi_buf_write_free(s, n);
 
count += n;
nbytes -= n;
diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index b47cc96..4a795e0 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -337,7 +337,7 @@ static inline unsigned int bytes_per_sample(const struct 
comedi_subdevice *subd)
 int comedi_set_hw_dev(struct comedi_device *dev, struct device *hw_dev);
 
 unsigned int comedi_buf_write_alloc(struct comedi_subdevice *s, unsigned int 
n);
-unsigned int comedi_buf_write_free(struct comedi_async *, unsigned int);
+unsigned int comedi_buf_write_free(struct comedi_subdevice *s, unsigned int n);
 
 unsigned int comedi_buf_read_n_available(struct comedi_async *);
 unsigned int comedi_buf_read_alloc(struct comedi_async *, unsigned int);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c 
b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
index 246220a..f540394 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
@@ -2716,7 +2716,7 @@ static int i_APCI3200_InterruptHandleEos(struct 
comedi_device *dev)
ui_ScanValueArray, (7 + 12) * sizeof(unsigned 
int));
 
/*  Update comedi buffer pinters indexes */
-   comedi_buf_write_free(s->async,
+   comedi_buf_write_free(s,
(7 + 12) * sizeof(unsigned int));
 
/*  Send events */
diff --git a/drivers/staging/comedi/drivers/comedi_fc.c 
b/drivers/staging/comedi/drivers/comedi_fc.c
index 21cf34e..a7860a4 100644
--- a/drivers/staging/comedi/drivers/comedi_fc.c
+++ b/drivers/staging/comedi/drivers/comedi_fc.c
@@ -75,7 +75,7 @@ unsigned int cfc_write_array_to_buffer(struct 
comedi_subdevice *s,
}
 
comedi_buf_memcpy_to(s, 0, data, num_bytes);
-   comedi_buf_write_free(async, num_bytes);
+   comedi_buf_write_free(s, num_bytes);
cfc_inc_scan_progress(s, num_bytes);
async->events |= COMEDI_CB_BLOCK;
 
diff --git a/drivers/staging/comedi/drivers/mite.c 
b/drivers/staging/comedi

[PATCH v2 15/20] staging: comedi: pass subdevice to __comedi_buf_write_alloc()

2014-05-06 Thread Ian Abbott
Local function `__comedi_buf_write_alloc()` is called by
`comedi_buf_write_alloc()` and `comedi_buf_put()`.  It currently takes a
pointer to a `struct comedi_async`.  Change it to take a pointer to a
`struct comedi_subdevice` and use the `async` member for consistency
with other comedi buffer handling functions.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index b5e329e..5be91cd 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -250,10 +250,11 @@ static unsigned int comedi_buf_write_n_available(struct 
comedi_async *async)
return free_end - async->buf_write_alloc_count;
 }
 
-static unsigned int __comedi_buf_write_alloc(struct comedi_async *async,
+static unsigned int __comedi_buf_write_alloc(struct comedi_subdevice *s,
 unsigned int nbytes,
 int strict)
 {
+   struct comedi_async *async = s->async;
unsigned int available = comedi_buf_write_n_available(async);
 
if (nbytes > available)
@@ -274,7 +275,7 @@ static unsigned int __comedi_buf_write_alloc(struct 
comedi_async *async,
 unsigned int comedi_buf_write_alloc(struct comedi_subdevice *s,
unsigned int nbytes)
 {
-   return __comedi_buf_write_alloc(s->async, nbytes, 0);
+   return __comedi_buf_write_alloc(s, nbytes, 0);
 }
 EXPORT_SYMBOL_GPL(comedi_buf_write_alloc);
 
@@ -427,7 +428,7 @@ EXPORT_SYMBOL_GPL(comedi_buf_read_free);
 int comedi_buf_put(struct comedi_subdevice *s, unsigned short x)
 {
struct comedi_async *async = s->async;
-   unsigned int n = __comedi_buf_write_alloc(async, sizeof(short), 1);
+   unsigned int n = __comedi_buf_write_alloc(s, sizeof(short), 1);
 
if (n < sizeof(short)) {
async->events |= COMEDI_CB_ERROR;
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 16/20] staging: comedi: pass subdevice to comedi_buf_write_n_available()

2014-05-06 Thread Ian Abbott
Local function `comedi_buf_write_n_available()` currently takes a
pointer to a `struct comedi_async`.  Change it to take a pointer to a
`struct comedi_subdevice` and use the `async` member for consistency
with the other comedi buffer handling functions.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index 5be91cd..df4a9c4 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -243,8 +243,9 @@ void comedi_buf_reset(struct comedi_subdevice *s)
async->events = 0;
 }
 
-static unsigned int comedi_buf_write_n_available(struct comedi_async *async)
+static unsigned int comedi_buf_write_n_available(struct comedi_subdevice *s)
 {
+   struct comedi_async *async = s->async;
unsigned int free_end = async->buf_read_count + async->prealloc_bufsz;
 
return free_end - async->buf_write_alloc_count;
@@ -255,7 +256,7 @@ static unsigned int __comedi_buf_write_alloc(struct 
comedi_subdevice *s,
 int strict)
 {
struct comedi_async *async = s->async;
-   unsigned int available = comedi_buf_write_n_available(async);
+   unsigned int available = comedi_buf_write_n_available(s);
 
if (nbytes > available)
nbytes = strict ? 0 : available;
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 12/20] staging: comedi: pass subdevice to comedi_buf_reset()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_reset()` to pass a pointer to the
comedi subdevice instead of a pointer to the "async" structure belonging
to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c  | 4 +++-
 drivers/staging/comedi/comedi_fops.c | 4 ++--
 drivers/staging/comedi/comedi_internal.h | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index f295285..fa5d6d4 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -222,8 +222,10 @@ int comedi_buf_alloc(struct comedi_device *dev, struct 
comedi_subdevice *s,
return 0;
 }
 
-void comedi_buf_reset(struct comedi_async *async)
+void comedi_buf_reset(struct comedi_subdevice *s)
 {
+   struct comedi_async *async = s->async;
+
async->buf_write_alloc_count = 0;
async->buf_write_count = 0;
async->buf_read_alloc_count = 0;
diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index ada6024..98229bd 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -583,7 +583,7 @@ static void do_become_nonbusy(struct comedi_device *dev,
 
comedi_set_subdevice_runflags(s, SRF_RUNNING, 0);
if (async) {
-   comedi_buf_reset(async);
+   comedi_buf_reset(s);
async->inttrig = NULL;
kfree(async->cmd.chanlist);
async->cmd.chanlist = NULL;
@@ -1557,7 +1557,7 @@ static int do_cmd_ioctl(struct comedi_device *dev,
goto cleanup;
}
 
-   comedi_buf_reset(async);
+   comedi_buf_reset(s);
 
async->cb_mask =
COMEDI_CB_EOA | COMEDI_CB_BLOCK | COMEDI_CB_ERROR |
diff --git a/drivers/staging/comedi/comedi_internal.h 
b/drivers/staging/comedi/comedi_internal.h
index 36e7a99..3cc81de 100644
--- a/drivers/staging/comedi/comedi_internal.h
+++ b/drivers/staging/comedi/comedi_internal.h
@@ -15,7 +15,7 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s);
 
 int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
 unsigned long new_size);
-void comedi_buf_reset(struct comedi_async *async);
+void comedi_buf_reset(struct comedi_subdevice *s);
 bool comedi_buf_is_mmapped(struct comedi_async *async);
 void comedi_buf_map_get(struct comedi_buf_map *bm);
 int comedi_buf_map_put(struct comedi_buf_map *bm);
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 14/20] staging: comedi: pass subdevice to comedi_buf_munge()

2014-05-06 Thread Ian Abbott
Local function `comedi_buf_munge()` is called by
`comedi_buf_write_free()` to modify (or "munge") the data copied from
a device into the buffer.

Currently, the function takes a pointer to a `struct comedi_async` and
gets a pointer to the comedi subdevice from the `subdevice` member.
Change it to take a pointer to a `struct comedi_subdevice` and get a
pointer to the "async" structure from the `async` member.

The main motivation for this is to elimate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index 46de933..b5e329e 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -282,10 +282,10 @@ EXPORT_SYMBOL_GPL(comedi_buf_write_alloc);
  * munging is applied to data by core as it passes between user
  * and kernel space
  */
-static unsigned int comedi_buf_munge(struct comedi_async *async,
+static unsigned int comedi_buf_munge(struct comedi_subdevice *s,
 unsigned int num_bytes)
 {
-   struct comedi_subdevice *s = async->subdevice;
+   struct comedi_async *async = s->async;
unsigned int count = 0;
const unsigned num_sample_bytes = bytes_per_sample(s);
 
@@ -344,7 +344,7 @@ unsigned int comedi_buf_write_free(struct comedi_subdevice 
*s,
 
async->buf_write_count += nbytes;
async->buf_write_ptr += nbytes;
-   comedi_buf_munge(async, async->buf_write_count - async->munge_count);
+   comedi_buf_munge(s, async->buf_write_count - async->munge_count);
if (async->buf_write_ptr >= async->prealloc_bufsz)
async->buf_write_ptr %= async->prealloc_bufsz;
 
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 13/20] staging: comedi: pass subdevice to comedi_buf_is_mmapped()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_is_mmapped()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c  | 4 ++--
 drivers/staging/comedi/comedi_fops.c | 4 ++--
 drivers/staging/comedi/comedi_internal.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index fa5d6d4..46de933 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -183,9 +183,9 @@ comedi_buf_map_from_subdev_get(struct comedi_subdevice *s)
return bm;
 }
 
-bool comedi_buf_is_mmapped(struct comedi_async *async)
+bool comedi_buf_is_mmapped(struct comedi_subdevice *s)
 {
-   struct comedi_buf_map *bm = async->buf_map;
+   struct comedi_buf_map *bm = s->async->buf_map;
 
return bm && (atomic_read(&bm->refcount.refcount) > 1);
 }
diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 98229bd..012c8fd 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -251,7 +251,7 @@ static int resize_async_buffer(struct comedi_device *dev,
"subdevice is busy, cannot resize buffer\n");
return -EBUSY;
}
-   if (comedi_buf_is_mmapped(async)) {
+   if (comedi_buf_is_mmapped(s)) {
dev_dbg(dev->class_dev,
"subdevice is mmapped, cannot resize buffer\n");
return -EBUSY;
@@ -635,7 +635,7 @@ static int is_device_busy(struct comedi_device *dev)
s = &dev->subdevices[i];
if (s->busy)
return 1;
-   if (s->async && comedi_buf_is_mmapped(s->async))
+   if (s->async && comedi_buf_is_mmapped(s))
return 1;
}
 
diff --git a/drivers/staging/comedi/comedi_internal.h 
b/drivers/staging/comedi/comedi_internal.h
index 3cc81de..e978c22 100644
--- a/drivers/staging/comedi/comedi_internal.h
+++ b/drivers/staging/comedi/comedi_internal.h
@@ -16,7 +16,7 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s);
 int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
 unsigned long new_size);
 void comedi_buf_reset(struct comedi_subdevice *s);
-bool comedi_buf_is_mmapped(struct comedi_async *async);
+bool comedi_buf_is_mmapped(struct comedi_subdevice *s);
 void comedi_buf_map_get(struct comedi_buf_map *bm);
 int comedi_buf_map_put(struct comedi_buf_map *bm);
 struct comedi_buf_map *comedi_buf_map_from_subdev_get(
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 09/20] staging: comedi: pass subdevice to comedi_buf_read_alloc()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_read_alloc()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c| 5 +++--
 drivers/staging/comedi/comedi_fops.c   | 4 ++--
 drivers/staging/comedi/comedidev.h | 2 +-
 drivers/staging/comedi/drivers/comedi_fc.c | 2 +-
 drivers/staging/comedi/drivers/mite.c  | 6 +++---
 drivers/staging/comedi/drivers/ni_mio_common.c | 4 ++--
 6 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index ac498e0..07e0b3a 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -370,9 +370,10 @@ unsigned int comedi_buf_read_n_available(struct 
comedi_async *async)
 EXPORT_SYMBOL_GPL(comedi_buf_read_n_available);
 
 /* allocates a chunk for the reader from filled (and munged) buffer space */
-unsigned int comedi_buf_read_alloc(struct comedi_async *async,
+unsigned int comedi_buf_read_alloc(struct comedi_subdevice *s,
   unsigned int nbytes)
 {
+   struct comedi_async *async = s->async;
unsigned int available;
 
available = async->munge_count - async->buf_read_alloc_count;
@@ -441,7 +442,7 @@ int comedi_buf_get(struct comedi_subdevice *s, unsigned 
short *x)
 
if (n < sizeof(short))
return 0;
-   comedi_buf_read_alloc(async, sizeof(short));
+   comedi_buf_read_alloc(s, sizeof(short));
*x = *(unsigned short *)(async->prealloc_buf + async->buf_read_ptr);
comedi_buf_read_free(async, sizeof(short));
return 1;
diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index bc93863..5164374 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -993,7 +993,7 @@ static int do_bufinfo_ioctl(struct comedi_device *dev,
return -EACCES;
 
if (bi.bytes_read && (s->subdev_flags & SDF_CMD_READ)) {
-   bi.bytes_read = comedi_buf_read_alloc(async, bi.bytes_read);
+   bi.bytes_read = comedi_buf_read_alloc(s, bi.bytes_read);
comedi_buf_read_free(async, bi.bytes_read);
 
if (comedi_is_subdevice_idle(s) &&
@@ -2272,7 +2272,7 @@ static ssize_t comedi_read(struct file *file, char __user 
*buf, size_t nbytes,
retval = -EFAULT;
}
 
-   comedi_buf_read_alloc(async, n);
+   comedi_buf_read_alloc(s, n);
comedi_buf_read_free(async, n);
 
count += n;
diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index 4a795e0..d2131f2 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -340,7 +340,7 @@ unsigned int comedi_buf_write_alloc(struct comedi_subdevice 
*s, unsigned int n);
 unsigned int comedi_buf_write_free(struct comedi_subdevice *s, unsigned int n);
 
 unsigned int comedi_buf_read_n_available(struct comedi_async *);
-unsigned int comedi_buf_read_alloc(struct comedi_async *, unsigned int);
+unsigned int comedi_buf_read_alloc(struct comedi_subdevice *s, unsigned int n);
 unsigned int comedi_buf_read_free(struct comedi_async *, unsigned int);
 
 int comedi_buf_put(struct comedi_subdevice *s, unsigned short x);
diff --git a/drivers/staging/comedi/drivers/comedi_fc.c 
b/drivers/staging/comedi/drivers/comedi_fc.c
index a7860a4..836eb1a 100644
--- a/drivers/staging/comedi/drivers/comedi_fc.c
+++ b/drivers/staging/comedi/drivers/comedi_fc.c
@@ -91,7 +91,7 @@ unsigned int cfc_read_array_from_buffer(struct 
comedi_subdevice *s,
if (num_bytes == 0)
return 0;
 
-   num_bytes = comedi_buf_read_alloc(async, num_bytes);
+   num_bytes = comedi_buf_read_alloc(s, num_bytes);
comedi_buf_memcpy_from(s, 0, data, num_bytes);
comedi_buf_read_free(async, num_bytes);
cfc_inc_scan_progress(s, num_bytes);
diff --git a/drivers/staging/comedi/drivers/mite.c 
b/drivers/staging/comedi/drivers/mite.c
index e33c03d..d1423ca 100644
--- a/drivers/staging/comedi/drivers/mite.c
+++ b/drivers/staging/comedi/drivers/mite.c
@@ -560,15 +560,15 @@ EXPORT_SYMBOL_GPL(mite_sync_input_dma);
 int mite_sync_output_dma(struct mite_channel *mite_chan,
 struct comedi_async *async)
 {
+   struct comedi_subdevice *s = async->subdevice;
int count;
u32 nbytes_ub, nbytes_lb;
unsigned int old_alloc_count;
-   u32 stop_count =
-   async->cmd.stop_arg * cfc_bytes_per_scan(async->subdevice);
+   u32 stop_count = async->cmd.stop_arg * cfc_bytes_per_s

[PATCH v2 19/20] staging: comedi: mite: pass subdevice to mite_sync_output_dma()

2014-05-06 Thread Ian Abbott
`mite_sync_output_dma()` in the "mite" module currently takes a pointer
to a `struct comedi_async` and gets a pointer to the owning `struct
comedi_subdevice` from the `subdevice` member.  Change it to take a
pointer to a `struct comedi_subdevice` and use the `async` member.

The motivation for this is to eliminate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/drivers/mite.c  | 7 +++
 drivers/staging/comedi/drivers/mite.h  | 2 +-
 drivers/staging/comedi/drivers/ni_mio_common.c | 4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/drivers/mite.c 
b/drivers/staging/comedi/drivers/mite.c
index f473841..c12806e 100644
--- a/drivers/staging/comedi/drivers/mite.c
+++ b/drivers/staging/comedi/drivers/mite.c
@@ -559,9 +559,9 @@ int mite_sync_input_dma(struct mite_channel *mite_chan,
 EXPORT_SYMBOL_GPL(mite_sync_input_dma);
 
 int mite_sync_output_dma(struct mite_channel *mite_chan,
-struct comedi_async *async)
+struct comedi_subdevice *s)
 {
-   struct comedi_subdevice *s = async->subdevice;
+   struct comedi_async *async = s->async;
int count;
u32 nbytes_ub, nbytes_lb;
unsigned int old_alloc_count;
@@ -579,8 +579,7 @@ int mite_sync_output_dma(struct mite_channel *mite_chan,
(int)(nbytes_ub - stop_count) > 0)
nbytes_ub = stop_count;
if ((int)(nbytes_ub - old_alloc_count) > 0) {
-   dev_warn(async->subdevice->device->class_dev,
-"mite: DMA underrun\n");
+   dev_warn(s->device->class_dev, "mite: DMA underrun\n");
async->events |= COMEDI_CB_OVERFLOW;
return -1;
}
diff --git a/drivers/staging/comedi/drivers/mite.h 
b/drivers/staging/comedi/drivers/mite.h
index ba3ad0c..e6e58e9 100644
--- a/drivers/staging/comedi/drivers/mite.h
+++ b/drivers/staging/comedi/drivers/mite.h
@@ -108,7 +108,7 @@ void mite_dma_disarm(struct mite_channel *mite_chan);
 int mite_sync_input_dma(struct mite_channel *mite_chan,
struct comedi_subdevice *s);
 int mite_sync_output_dma(struct mite_channel *mite_chan,
-struct comedi_async *async);
+struct comedi_subdevice *s);
 u32 mite_bytes_written_to_memory_lb(struct mite_channel *mite_chan);
 u32 mite_bytes_written_to_memory_ub(struct mite_channel *mite_chan);
 u32 mite_bytes_read_from_memory_lb(struct mite_channel *mite_chan);
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c 
b/drivers/staging/comedi/drivers/ni_mio_common.c
index 953130b..9afe76f 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -877,7 +877,7 @@ static void mite_handle_b_linkc(struct mite_struct *mite,
 
spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
if (devpriv->ao_mite_chan)
-   mite_sync_output_dma(devpriv->ao_mite_chan, s->async);
+   mite_sync_output_dma(devpriv->ao_mite_chan, s);
spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
 }
 
@@ -3640,7 +3640,7 @@ static void handle_cdio_interrupt(struct comedi_device 
*dev)
   devpriv->mite->mite_io_addr +
   MITE_CHOR(devpriv->cdo_mite_chan->channel));
}
-   mite_sync_output_dma(devpriv->cdo_mite_chan, s->async);
+   mite_sync_output_dma(devpriv->cdo_mite_chan, s);
}
spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
 #endif
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 10/20] staging: comedi: pass subdevice to comedi_buf_read_free()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_read_free()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c| 5 +++--
 drivers/staging/comedi/comedi_fops.c   | 4 ++--
 drivers/staging/comedi/comedidev.h | 2 +-
 drivers/staging/comedi/drivers/comedi_fc.c | 6 ++
 drivers/staging/comedi/drivers/mite.c  | 2 +-
 5 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index 07e0b3a..a3c3f21 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -398,9 +398,10 @@ static unsigned int comedi_buf_read_n_allocated(struct 
comedi_async *async)
 }
 
 /* transfers control of a chunk from reader to free buffer space */
-unsigned int comedi_buf_read_free(struct comedi_async *async,
+unsigned int comedi_buf_read_free(struct comedi_subdevice *s,
  unsigned int nbytes)
 {
+   struct comedi_async *async = s->async;
unsigned int allocated;
 
/*
@@ -444,7 +445,7 @@ int comedi_buf_get(struct comedi_subdevice *s, unsigned 
short *x)
return 0;
comedi_buf_read_alloc(s, sizeof(short));
*x = *(unsigned short *)(async->prealloc_buf + async->buf_read_ptr);
-   comedi_buf_read_free(async, sizeof(short));
+   comedi_buf_read_free(s, sizeof(short));
return 1;
 }
 EXPORT_SYMBOL_GPL(comedi_buf_get);
diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 5164374..365e191 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -994,7 +994,7 @@ static int do_bufinfo_ioctl(struct comedi_device *dev,
 
if (bi.bytes_read && (s->subdev_flags & SDF_CMD_READ)) {
bi.bytes_read = comedi_buf_read_alloc(s, bi.bytes_read);
-   comedi_buf_read_free(async, bi.bytes_read);
+   comedi_buf_read_free(s, bi.bytes_read);
 
if (comedi_is_subdevice_idle(s) &&
async->buf_write_count == async->buf_read_count) {
@@ -2273,7 +2273,7 @@ static ssize_t comedi_read(struct file *file, char __user 
*buf, size_t nbytes,
}
 
comedi_buf_read_alloc(s, n);
-   comedi_buf_read_free(async, n);
+   comedi_buf_read_free(s, n);
 
count += n;
nbytes -= n;
diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index d2131f2..c481620 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -341,7 +341,7 @@ unsigned int comedi_buf_write_free(struct comedi_subdevice 
*s, unsigned int n);
 
 unsigned int comedi_buf_read_n_available(struct comedi_async *);
 unsigned int comedi_buf_read_alloc(struct comedi_subdevice *s, unsigned int n);
-unsigned int comedi_buf_read_free(struct comedi_async *, unsigned int);
+unsigned int comedi_buf_read_free(struct comedi_subdevice *s, unsigned int n);
 
 int comedi_buf_put(struct comedi_subdevice *s, unsigned short x);
 int comedi_buf_get(struct comedi_subdevice *s, unsigned short *x);
diff --git a/drivers/staging/comedi/drivers/comedi_fc.c 
b/drivers/staging/comedi/drivers/comedi_fc.c
index 836eb1a..cf3da2c 100644
--- a/drivers/staging/comedi/drivers/comedi_fc.c
+++ b/drivers/staging/comedi/drivers/comedi_fc.c
@@ -86,16 +86,14 @@ EXPORT_SYMBOL_GPL(cfc_write_array_to_buffer);
 unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *s,
void *data, unsigned int num_bytes)
 {
-   struct comedi_async *async = s->async;
-
if (num_bytes == 0)
return 0;
 
num_bytes = comedi_buf_read_alloc(s, num_bytes);
comedi_buf_memcpy_from(s, 0, data, num_bytes);
-   comedi_buf_read_free(async, num_bytes);
+   comedi_buf_read_free(s, num_bytes);
cfc_inc_scan_progress(s, num_bytes);
-   async->events |= COMEDI_CB_BLOCK;
+   s->async->events |= COMEDI_CB_BLOCK;
 
return num_bytes;
 }
diff --git a/drivers/staging/comedi/drivers/mite.c 
b/drivers/staging/comedi/drivers/mite.c
index d1423ca..6c8bd7c 100644
--- a/drivers/staging/comedi/drivers/mite.c
+++ b/drivers/staging/comedi/drivers/mite.c
@@ -588,7 +588,7 @@ int mite_sync_output_dma(struct mite_channel *mite_chan,
return 0;
 
if (count) {
-   comedi_buf_read_free(async, count);
+   comedi_buf_read_free(s, count);
async->events |= COMEDI_CB_BLOCK;
}
return 0;
-- 
1.9.2

___
devel mailing list
de...@linuxdriverp

[PATCH v2 17/20] staging: comedi: mite: pass subdevice to mite_buf_change()

2014-05-06 Thread Ian Abbott
`mite_buf_change()` in the "mite" module currently takes a pointer to a
`struct comedi_async` and gets a pointer to the owning `struct
comedi_subdevice` from the `subdevice` member.  Change it to take a
pointer to a `struct comedi_subdevice` and use the `async` member.

The motivation for this is to eliminate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/drivers/mite.c  |  5 +++--
 drivers/staging/comedi/drivers/mite.h  |  2 +-
 drivers/staging/comedi/drivers/ni_660x.c   |  2 +-
 drivers/staging/comedi/drivers/ni_pcidio.c |  2 +-
 drivers/staging/comedi/drivers/ni_pcimio.c | 10 +-
 5 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/mite.c 
b/drivers/staging/comedi/drivers/mite.c
index 6c8bd7c..2d224cf 100644
--- a/drivers/staging/comedi/drivers/mite.c
+++ b/drivers/staging/comedi/drivers/mite.c
@@ -307,8 +307,9 @@ EXPORT_SYMBOL_GPL(mite_dma_arm);
 /**/
 
 int mite_buf_change(struct mite_dma_descriptor_ring *ring,
-   struct comedi_async *async)
+   struct comedi_subdevice *s)
 {
+   struct comedi_async *async = s->async;
unsigned int n_links;
int i;
 
@@ -333,7 +334,7 @@ int mite_buf_change(struct mite_dma_descriptor_ring *ring,
   n_links * sizeof(struct mite_dma_descriptor),
   &ring->descriptors_dma_addr, GFP_KERNEL);
if (!ring->descriptors) {
-   dev_err(async->subdevice->device->class_dev,
+   dev_err(s->device->class_dev,
"mite: ring buffer allocation failed\n");
return -ENOMEM;
}
diff --git a/drivers/staging/comedi/drivers/mite.h 
b/drivers/staging/comedi/drivers/mite.h
index 78f2357..929b9bb 100644
--- a/drivers/staging/comedi/drivers/mite.h
+++ b/drivers/staging/comedi/drivers/mite.h
@@ -120,7 +120,7 @@ int mite_done(struct mite_channel *mite_chan);
 void mite_prep_dma(struct mite_channel *mite_chan,
   unsigned int num_device_bits, unsigned int num_memory_bits);
 int mite_buf_change(struct mite_dma_descriptor_ring *ring,
-   struct comedi_async *async);
+   struct comedi_subdevice *s);
 
 static inline int CHAN_OFFSET(int channel)
 {
diff --git a/drivers/staging/comedi/drivers/ni_660x.c 
b/drivers/staging/comedi/drivers/ni_660x.c
index 2858b3d..3901e3b 100644
--- a/drivers/staging/comedi/drivers/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_660x.c
@@ -836,7 +836,7 @@ static int ni_660x_buf_change(struct comedi_device *dev,
struct ni_gpct *counter = s->private;
int ret;
 
-   ret = mite_buf_change(mite_ring(devpriv, counter), s->async);
+   ret = mite_buf_change(mite_ring(devpriv, counter), s);
if (ret < 0)
return ret;
 
diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c 
b/drivers/staging/comedi/drivers/ni_pcidio.c
index d0ad82a..1f84235 100644
--- a/drivers/staging/comedi/drivers/ni_pcidio.c
+++ b/drivers/staging/comedi/drivers/ni_pcidio.c
@@ -806,7 +806,7 @@ static int ni_pcidio_change(struct comedi_device *dev,
struct nidio96_private *devpriv = dev->private;
int ret;
 
-   ret = mite_buf_change(devpriv->di_mite_ring, s->async);
+   ret = mite_buf_change(devpriv->di_mite_ring, s);
if (ret < 0)
return ret;
 
diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c 
b/drivers/staging/comedi/drivers/ni_pcimio.c
index d40df07..89300dc 100644
--- a/drivers/staging/comedi/drivers/ni_pcimio.c
+++ b/drivers/staging/comedi/drivers/ni_pcimio.c
@@ -1560,7 +1560,7 @@ static int pcimio_ai_change(struct comedi_device *dev,
struct ni_private *devpriv = dev->private;
int ret;
 
-   ret = mite_buf_change(devpriv->ai_mite_ring, s->async);
+   ret = mite_buf_change(devpriv->ai_mite_ring, s);
if (ret < 0)
return ret;
 
@@ -1573,7 +1573,7 @@ static int pcimio_ao_change(struct comedi_device *dev,
struct ni_private *devpriv = dev->private;
int ret;
 
-   ret = mite_buf_change(devpriv->ao_mite_ring, s->async);
+   ret = mite_buf_change(devpriv->ao_mite_ring, s);
if (ret < 0)
return ret;
 
@@ -1587,7 +1587,7 @@ static int pcimio_gpct0_change(struct comedi_device *dev,
struct ni_private *devpriv = dev->private;
int ret;
 
-   ret = mite_buf_change(devpriv->gpct_mite_ring[0], s->async);
+   ret = mite_buf_change(devpriv->gpct_mite_ring[0], s);
if (ret < 0)
return ret;
 
@@ -1601,7 +1601,7 @@ static int pcimio_gpct1_change(struct comedi_device *dev,
struct ni_private *devpriv = dev->private;
int ret;
 
-   ret = mite_buf_change(devpriv->gpct_mite_ring[1], s->async);
+   ret = mite_buf_change(devpriv->gpct_mite_ring[1], s);
   

[PATCH v2 11/20] staging: comedi: pass subdevice to comedi_buf_read_n_available()

2014-05-06 Thread Ian Abbott
Change the parameters of `comedi_buf_read_n_available()` to pass a
pointer to the comedi subdevice instead of a pointer to the "async"
structure belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedi_buf.c| 5 +++--
 drivers/staging/comedi/comedi_fops.c   | 4 ++--
 drivers/staging/comedi/comedidev.h | 2 +-
 drivers/staging/comedi/drivers/amplc_pci224.c  | 2 +-
 drivers/staging/comedi/drivers/amplc_pci230.c  | 2 +-
 drivers/staging/comedi/drivers/cb_pcidas64.c   | 2 +-
 drivers/staging/comedi/drivers/ni_660x.c   | 2 +-
 drivers/staging/comedi/drivers/ni_mio_common.c | 4 ++--
 8 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/comedi/comedi_buf.c 
b/drivers/staging/comedi/comedi_buf.c
index a3c3f21..f295285 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -350,8 +350,9 @@ unsigned int comedi_buf_write_free(struct comedi_subdevice 
*s,
 }
 EXPORT_SYMBOL_GPL(comedi_buf_write_free);
 
-unsigned int comedi_buf_read_n_available(struct comedi_async *async)
+unsigned int comedi_buf_read_n_available(struct comedi_subdevice *s)
 {
+   struct comedi_async *async = s->async;
unsigned num_bytes;
 
if (!async)
@@ -439,7 +440,7 @@ EXPORT_SYMBOL_GPL(comedi_buf_put);
 int comedi_buf_get(struct comedi_subdevice *s, unsigned short *x)
 {
struct comedi_async *async = s->async;
-   unsigned int n = comedi_buf_read_n_available(async);
+   unsigned int n = comedi_buf_read_n_available(s);
 
if (n < sizeof(short))
return 0;
diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 365e191..ada6024 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2029,7 +2029,7 @@ static unsigned int comedi_poll(struct file *file, 
poll_table *wait)
if (s && s->async) {
poll_wait(file, &s->async->wait_head, wait);
if (!s->busy || !comedi_is_subdevice_running(s) ||
-   comedi_buf_read_n_available(s->async) > 0)
+   comedi_buf_read_n_available(s) > 0)
mask |= POLLIN | POLLRDNORM;
}
 
@@ -2229,7 +2229,7 @@ static ssize_t comedi_read(struct file *file, char __user 
*buf, size_t nbytes,
 
n = nbytes;
 
-   m = comedi_buf_read_n_available(async);
+   m = comedi_buf_read_n_available(s);
/* printk("%d available\n",m); */
if (async->buf_read_ptr + m > async->prealloc_bufsz)
m = async->prealloc_bufsz - async->buf_read_ptr;
diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index c481620..a5d479c 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -339,7 +339,7 @@ int comedi_set_hw_dev(struct comedi_device *dev, struct 
device *hw_dev);
 unsigned int comedi_buf_write_alloc(struct comedi_subdevice *s, unsigned int 
n);
 unsigned int comedi_buf_write_free(struct comedi_subdevice *s, unsigned int n);
 
-unsigned int comedi_buf_read_n_available(struct comedi_async *);
+unsigned int comedi_buf_read_n_available(struct comedi_subdevice *s);
 unsigned int comedi_buf_read_alloc(struct comedi_subdevice *s, unsigned int n);
 unsigned int comedi_buf_read_free(struct comedi_subdevice *s, unsigned int n);
 
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c 
b/drivers/staging/comedi/drivers/amplc_pci224.c
index c2b352c..29179b5 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -558,7 +558,7 @@ static void pci224_ao_handle_fifo(struct comedi_device *dev,
bytes_per_scan = sizeof(short);
}
/* Determine number of scans available in buffer. */
-   num_scans = comedi_buf_read_n_available(s->async) / bytes_per_scan;
+   num_scans = comedi_buf_read_n_available(s) / bytes_per_scan;
if (cmd->stop_src == TRIG_COUNT) {
/* Fixed number of scans. */
if (num_scans > devpriv->ao_stop_count)
diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c 
b/drivers/staging/comedi/drivers/amplc_pci230.c
index d0740d60..d6f6a7a 100644
--- a/drivers/staging/comedi/drivers/amplc_pci230.c
+++ b/drivers/staging/comedi/drivers/amplc_pci230.c
@@ -1205,7 +1205,7 @@ static int pci230_handle_ao_fifo(struct comedi_device 
*dev,
dacstat = inw(dev->iobase + PCI230_DACCON);
/* Determine number of scans available in buffer. */
bytes_per_scan = cmd->chanlist_len * sizeof(short);
-   num_scans = comedi_buf_read_n_available(async) / bytes_per_scan;
+   num_scans = comedi_buf_read_n_ava

[PATCH v2 20/20] staging: comedi: remove subdevice member of struct comedi_async

2014-05-06 Thread Ian Abbott
The `async` member of `struct comedi_subdevice` may point to a `struct
comedi_async` or may be NULL.  The `subdevice` member of `struct
comedi_async` points back to the `struct comedi_subdevice` associated
with it in a one-to-one relationship.

All uses of the `subdevice` member of `struct comedi_async` apart from
its initialization have now been removed (by passing around a pointer to
the subdevice instead of to the "async" structure), so get rid of it.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/comedidev.h | 2 --
 drivers/staging/comedi/drivers.c   | 1 -
 2 files changed, 3 deletions(-)

diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index a5d479c..d07d47f 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -108,8 +108,6 @@ struct comedi_buf_map {
 };
 
 struct comedi_async {
-   struct comedi_subdevice *subdevice;
-
void *prealloc_buf; /* pre-allocated buffer */
unsigned int prealloc_bufsz;/* buffer size, in bytes */
struct comedi_buf_map *buf_map; /* map of buffer pages */
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index cb5d214..299726f 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -307,7 +307,6 @@ static int __comedi_device_postconfig_async(struct 
comedi_device *dev,
return -ENOMEM;
 
init_waitqueue_head(&async->wait_head);
-   async->subdevice = s;
s->async = async;
 
async->max_bufsize = comedi_default_buf_maxsize_kb * 1024;
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 18/20] staging: comedi: mite: pass subdevice to mite_sync_input_dma()

2014-05-06 Thread Ian Abbott
`mite_sync_input_dma()` in the "mite" module currently takes a pointer
to a `struct comedi_async` and gets a pointer to the owning `struct
comedi_subdevice` from the `subdevice` member.  Change it to take a
pointer to a `struct comedi_subdevice` and use the `async` member.

The motivation for this is to eliminate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott 
---
v2: rebased to current staging-next.
---
 drivers/staging/comedi/drivers/mite.c  | 4 ++--
 drivers/staging/comedi/drivers/mite.h  | 2 +-
 drivers/staging/comedi/drivers/ni_660x.c   | 2 +-
 drivers/staging/comedi/drivers/ni_mio_common.c | 2 +-
 drivers/staging/comedi/drivers/ni_pcidio.c | 4 ++--
 drivers/staging/comedi/drivers/ni_tiocmd.c | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/comedi/drivers/mite.c 
b/drivers/staging/comedi/drivers/mite.c
index 2d224cf..f473841 100644
--- a/drivers/staging/comedi/drivers/mite.c
+++ b/drivers/staging/comedi/drivers/mite.c
@@ -526,9 +526,9 @@ void mite_dma_disarm(struct mite_channel *mite_chan)
 EXPORT_SYMBOL_GPL(mite_dma_disarm);
 
 int mite_sync_input_dma(struct mite_channel *mite_chan,
-   struct comedi_async *async)
+   struct comedi_subdevice *s)
 {
-   struct comedi_subdevice *s = async->subdevice;
+   struct comedi_async *async = s->async;
int count;
unsigned int nbytes, old_alloc_count;
 
diff --git a/drivers/staging/comedi/drivers/mite.h 
b/drivers/staging/comedi/drivers/mite.h
index 929b9bb..ba3ad0c 100644
--- a/drivers/staging/comedi/drivers/mite.h
+++ b/drivers/staging/comedi/drivers/mite.h
@@ -106,7 +106,7 @@ unsigned mite_dma_tcr(struct mite_channel *mite_chan);
 void mite_dma_arm(struct mite_channel *mite_chan);
 void mite_dma_disarm(struct mite_channel *mite_chan);
 int mite_sync_input_dma(struct mite_channel *mite_chan,
-   struct comedi_async *async);
+   struct comedi_subdevice *s);
 int mite_sync_output_dma(struct mite_channel *mite_chan,
 struct comedi_async *async);
 u32 mite_bytes_written_to_memory_lb(struct mite_channel *mite_chan);
diff --git a/drivers/staging/comedi/drivers/ni_660x.c 
b/drivers/staging/comedi/drivers/ni_660x.c
index 3901e3b..634cde8 100644
--- a/drivers/staging/comedi/drivers/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_660x.c
@@ -823,7 +823,7 @@ static int ni_660x_input_poll(struct comedi_device *dev,
 
/* lock to avoid race with comedi_poll */
spin_lock_irqsave(&devpriv->interrupt_lock, flags);
-   mite_sync_input_dma(counter->mite_chan, s->async);
+   mite_sync_input_dma(counter->mite_chan, s);
spin_unlock_irqrestore(&devpriv->interrupt_lock, flags);
return comedi_buf_read_n_available(s);
 }
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c 
b/drivers/staging/comedi/drivers/ni_mio_common.c
index e54488c..953130b 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -864,7 +864,7 @@ static void ni_sync_ai_dma(struct comedi_device *dev)
 
spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
if (devpriv->ai_mite_chan)
-   mite_sync_input_dma(devpriv->ai_mite_chan, s->async);
+   mite_sync_input_dma(devpriv->ai_mite_chan, s);
spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
 }
 
diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c 
b/drivers/staging/comedi/drivers/ni_pcidio.c
index 1f84235..14aaa58 100644
--- a/drivers/staging/comedi/drivers/ni_pcidio.c
+++ b/drivers/staging/comedi/drivers/ni_pcidio.c
@@ -359,7 +359,7 @@ static int ni_pcidio_poll(struct comedi_device *dev, struct 
comedi_subdevice *s)
spin_lock_irqsave(&dev->spinlock, irq_flags);
spin_lock(&devpriv->mite_channel_lock);
if (devpriv->di_mite_chan)
-   mite_sync_input_dma(devpriv->di_mite_chan, s->async);
+   mite_sync_input_dma(devpriv->di_mite_chan, s);
spin_unlock(&devpriv->mite_channel_lock);
count = s->async->buf_write_count - s->async->buf_read_count;
spin_unlock_irqrestore(&dev->spinlock, irq_flags);
@@ -405,7 +405,7 @@ static irqreturn_t nidio_interrupt(int irq, void *d)
writel(CHOR_CLRLC,
   mite->mite_io_addr +
   MITE_CHOR(devpriv->di_mite_chan->channel));
-   mite_sync_input_dma(devpriv->di_mite_chan, s->async);
+   mite_sync_input_dma(devpriv->di_mite_chan, s);
/* XXX need to byteswap */
}
if (m_status & ~(CHSR_INT | CHSR_LINKC | CHSR_DONE | CHSR_DRDY |
diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c 
b/drivers/staging/comedi/drivers/ni_tiocmd.c
index 9cc77c0..2557ab4 100644
--- a/drivers/staging/comedi/drivers/ni_tiocmd.c
+++ b/drivers/stag

GLUCKWUNGLÜCKWUNSCH AN SIE ($4.500.000,00 USD)

2014-05-06 Thread UNITED STATES LOTTO
UNITED STATES OF AMERICA LOTTO INC.
ADRESSE: LANDSDOWN
STADT: St NORTH BETHESDA
STATE/PROVINCE: MARYLAND
POSTCODE: 20852
LAND: USA
INC.

REF NR.:525743970

STAPEL NR.:6474869989/603

LOTTO GEWINNER
BETR.: ENDGULTIGE NOTIFIKATION
GLUCKWUNSCHE!

Die Vereinigten Staaten Lottery Inc: Wir sind erfreut, offiziell mitteilen zu 
können,
dass Ihre E-Mail-Adresse ist die Summe von $4.500.000,00 USD gewann heute 
gewesen 5 Mai
2014. Sie sollten der National Westminster Bank Plc mit folgenden Daten 
kontaktieren.

National Westminster Bank Plc
BUNDESREPUBLIK DEUTSCHLAND PAYMENT ZENTRUM
Ansprechpartner: Dr. Peter Cox & Dr Collins Daniel
# 135 Bishopsgate London EC2M 3UR
London, United Kingdom.
E-mail: postcashp...@post.com

Um Ihren Preis wert Summe von $4.500.000,00 USD behaupten, sollten Sie in Ihrem 
genaue
Daten zu füllen, wie unten an und übermittelt ihn unverzüglich die 
erforderlichen
National Westminster Bank Plc, Bundesrepublik Deutschland Zahlung per e-mail:
postcashp...@post.com

{UNITED STATES Lottogewinner ANTRAG AUF ZAHLUNG}.
** *
VORNAME __
NAMEN 
GEBURT ___
SEX _
ADRESSE _
NATIONALITY _
JOB _
TELEFONNUMMER 
Faxnummer __
Gewonnene Betrag __

REF NR.:525743970

STAPEL NR.:6474869989/603

GENEHMIGT FUER ZAHLUNG
*
NOTIZ
**
Registereintragung:
Amtsgericht Hamburg BDW 9243
Vorsitzender des Aufsichtsrats:
Dipl.-Ing. Dr.-Ing. E.h.
Sven IngelmannVorstand:
Peter Wilde   
(Vorsitzender)
Jochen Karl 


-- 
Esta mensagem foi verificada pelo sistema de antiv�rus e
 acredita-se estar livre de perigo.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: dgnc: fix compile warning frame size is larger than 1024 bytes

2014-05-06 Thread Martin Kepplinger
fix following warning by dynamically allocating memory:
dgnc_tty.c:583:1: warning: the frame size of 1060 bytes is larger than 1024 
bytes [-Wframe-larger-than=]

Signed-off-by: Martin Kepplinger 
---
This is more of a question. Is this a desired solution to fixing such a
frame size warning?

thanks,
martin

 drivers/staging/dgnc/dgnc_tty.c |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index f0b17c3..1c78cc2 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -481,8 +481,8 @@ void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar 
*text, uchar *buf, int
int nbuf;
int i;
int tmpbuflen;
-   char tmpbuf[TMPBUFLEN];
-   char *p = tmpbuf;
+   char *tmpbuf;
+   char *p;
int too_much_data;
 
/* Leave if sniff not open */
@@ -492,6 +492,13 @@ void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar 
*text, uchar *buf, int
do_gettimeofday(&tv);
 
/* Create our header for data dump */
+   tmpbuf = kmalloc(TMPBUFLEN, GFP_KERNEL);
+   if (!tmpbuf) {
+   pr_err("dgnc: memory allocation error\n");
+   return;
+   }
+   p = tmpbuf;
+
p += sprintf(p, "<%ld %ld><%s><", tv.tv_sec, tv.tv_usec, text);
tmpbuflen = p - tmpbuf;
 
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [GIT PULL] imx-drm urgent fixes

2014-05-06 Thread Greg Kroah-Hartman
On Tue, May 06, 2014 at 10:11:00AM +0100, Russell King wrote:
> Greg,
> 
> Did you get a chance to look at this?

Thanks for the ping, I overlooked these for the last round of patches to
Linus.  Now pulled and pushed out so that I don't miss them for
3.15-final.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [GIT PULL] imx-drm non-urgent fixes

2014-05-06 Thread Greg Kroah-Hartman
On Tue, May 06, 2014 at 10:11:07AM +0100, Russell King wrote:
> Greg,
> 
> Did you get a chance to look at this?

Sorry for the delay, now pulled and pushed out.

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: dgnc: fix compile warning frame size is larger than 1024 bytes

2014-05-06 Thread Dan Carpenter
On Tue, May 06, 2014 at 02:41:37PM +0200, Martin Kepplinger wrote:
> fix following warning by dynamically allocating memory:
> dgnc_tty.c:583:1: warning: the frame size of 1060 bytes is larger than 1024 
> bytes [-Wframe-larger-than=]
> 
> Signed-off-by: Martin Kepplinger 
> ---
> This is more of a question. Is this a desired solution to fixing such a
> frame size warning?

This warning is because the kernel uses an 8k stack so you add up all
the stack memory used by each function from the syscall to here.  If
it adds up to more than 8k then it's a bug.  The 1k limit per function
is just a hack to spot where people are maybe being reckless.

There are no kfree()s and this function is called with a spin_lock held
so this patch introduces a couple bugs.

There may be a better way to allocate this.  Like maybe at probe() and
then use spinlocks to serialize access to the buffer.  But sometimes
that's a very bad idea.

It's better if you know the driver a bit and can test things.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: dgnc: fix compile warning frame size is larger than 1024 bytes

2014-05-06 Thread Martin Kepplinger
Am 2014-05-06 15:33, schrieb Dan Carpenter:
> On Tue, May 06, 2014 at 02:41:37PM +0200, Martin Kepplinger wrote:
>> fix following warning by dynamically allocating memory:
>> dgnc_tty.c:583:1: warning: the frame size of 1060 bytes is larger than 1024 
>> bytes [-Wframe-larger-than=]
>>
>> Signed-off-by: Martin Kepplinger 
>> ---
>> This is more of a question. Is this a desired solution to fixing such a
>> frame size warning?
> 
> This warning is because the kernel uses an 8k stack so you add up all
> the stack memory used by each function from the syscall to here.  If
> it adds up to more than 8k then it's a bug.  The 1k limit per function
> is just a hack to spot where people are maybe being reckless.

nice. thanks.

> 
> There are no kfree()s and this function is called with a spin_lock held
> so this patch introduces a couple bugs.

I know, it should have been just a question (probably to kernelnewbies'
list). Sorry for the noise.

> 
> There may be a better way to allocate this.  Like maybe at probe() and
> then use spinlocks to serialize access to the buffer.  But sometimes
> that's a very bad idea.
> 
> It's better if you know the driver a bit and can test things.
> 
> regards,
> dan carpenter
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: lustre: remove unused variables

2014-05-06 Thread Emil Goode
The following commit left some unused variables behind.

commit 80db2734acbc78db12798cfb611d6acc7fe389e6
Author: Fredrick John Berchmans 
Date:   Fri May 2 19:50:15 2014 -0700

staging: lustre use kernel socket sockopt apis

Signed-off-by: Emil Goode 
---
 drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c 
b/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
index 4153b4a..ac3a444 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
@@ -46,10 +46,8 @@
 int
 libcfs_sock_ioctl(int cmd, unsigned long arg)
 {
-   mm_segment_toldmm = get_fs();
struct socket  *sock;
int  rc;
-   struct file*sock_filp;
 
rc = sock_create (PF_INET, SOCK_STREAM, 0, &sock);
if (rc != 0) {
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging/olpc_dcon: fix checkpatch warnings

2014-05-06 Thread Nicolas Joseph
WARNING: Missing a blank line after declarations

Signed-off-by: Nicolas Joseph 
---
 drivers/staging/olpc_dcon/olpc_dcon.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c 
b/drivers/staging/olpc_dcon/olpc_dcon.c
index 26b4ec5..eb83b28 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -210,6 +210,7 @@ static void dcon_sleep(struct dcon_priv *dcon, bool sleep)
 
if (sleep) {
u8 pm = 0;
+
x = olpc_ec_cmd(EC_DCON_POWER_MODE, &pm, 1, NULL, 0);
if (x)
pr_warn("unable to force dcon to power down: %d!\n", x);
@@ -240,6 +241,7 @@ static void dcon_sleep(struct dcon_priv *dcon, bool sleep)
 static void dcon_load_holdoff(struct dcon_priv *dcon)
 {
struct timespec delta_t, now;
+
while (1) {
getnstimeofday(&now);
delta_t = timespec_sub(now, dcon->load_time);
@@ -399,14 +401,15 @@ static ssize_t dcon_mode_show(struct device *dev,
struct device_attribute *attr, char *buf)
 {
struct dcon_priv *dcon = dev_get_drvdata(dev);
+
return sprintf(buf, "%4.4X\n", dcon->disp_mode);
 }
 
 static ssize_t dcon_sleep_show(struct device *dev,
struct device_attribute *attr, char *buf)
 {
-
struct dcon_priv *dcon = dev_get_drvdata(dev);
+
return sprintf(buf, "%d\n", dcon->asleep);
 }
 
@@ -414,6 +417,7 @@ static ssize_t dcon_freeze_show(struct device *dev,
struct device_attribute *attr, char *buf)
 {
struct dcon_priv *dcon = dev_get_drvdata(dev);
+
return sprintf(buf, "%d\n", dcon->curr_src == DCON_SOURCE_DCON ? 1 : 0);
 }
 
@@ -421,6 +425,7 @@ static ssize_t dcon_mono_show(struct device *dev,
struct device_attribute *attr, char *buf)
 {
struct dcon_priv *dcon = dev_get_drvdata(dev);
+
return sprintf(buf, "%d\n", dcon->mono);
 }
 
@@ -534,6 +539,7 @@ static int dcon_bl_update(struct backlight_device *dev)
 static int dcon_bl_get(struct backlight_device *dev)
 {
struct dcon_priv *dcon = bl_get_data(dev);
+
return dcon->bl_val;
 }
 
-- 
2.0.0.rc0
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 4/4] staging: comedi: adl_pc19111: remove 'continuous' from subdevice private data

2014-05-06 Thread Hartley Sweeten
On Tuesday, May 06, 2014 2:59 AM, Ian Abbott wrote:
> On 2014-05-05 17:48, H Hartley Sweeten wrote:
>> This member of the subdevice private data can be determined from the
>> cmd->stop_src. Do that instead.
>>
>> Signed-off-by: H Hartley Sweeten 
>> Cc: Ian Abbott 
>> Cc: Greg Kroah-Hartman 
>> ---
>>   drivers/staging/comedi/drivers/amplc_dio200_common.c | 18 
>> +-
>>   1 file changed, 5 insertions(+), 13 deletions(-)
>
> The patch doesn't match the description (different module).  Maybe some 
> bleed-over from a different patch series?

Ugh... Looks like is screwed up the subject. If should have been:

staging: comedi: amplc_dio200_common: remove 'continuous' from subdevice 
private data

Greg,

Can you drop this one and take the other three? I will resubmit it later.

Thanks,
Hartley
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 05/24] staging: comedi: amplc_pci224: use comedi_fc helpers to validate timer args

2014-05-06 Thread Hartley Sweeten
On Tuesday, May 06, 2014 3:46 AM, Ian Abbott wrote:
> On 2014-05-05 17:59, H Hartley Sweeten wrote:
>> Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the
>> scan_begin_arg when the scan_begin_src is TRIG_TIMER.
>>
>> For aesthetics reasons, rename the local variable 'tmp' to 'arg'.
>>
>> Signed-off-by: H Hartley Sweeten 
>> Cc: Ian Abbott 
>> Cc: Greg Kroah-Hartman 
>> ---
>>   drivers/staging/comedi/drivers/amplc_pci224.c | 29 
>> +--
>>   1 file changed, 14 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c 
>> b/drivers/staging/comedi/drivers/amplc_pci224.c
>> index c2b352c..ec65a34 100644
>> --- a/drivers/staging/comedi/drivers/amplc_pci224.c
>> +++ b/drivers/staging/comedi/drivers/amplc_pci224.c
>> @@ -719,7 +719,7 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct 
>> comedi_subdevice *s,
>>   {
>>  struct pci224_private *devpriv = dev->private;
>>  int err = 0;
>> -unsigned int tmp;
>> +unsigned int arg;
>>
>>  /* Step 1 : check if triggers are trivially valid */
>>
>> @@ -746,14 +746,14 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct 
>> comedi_subdevice *s,
>>   * There's only one external trigger signal (which makes these
>>   * tests easier).  Only one thing can use it.
>>   */
>> -tmp = 0;
>> +err = 0;
>>  if (cmd->start_src & TRIG_EXT)
>> -tmp++;
>> +err++;
>>  if (cmd->scan_begin_src & TRIG_EXT)
>> -tmp++;
>> +err++;
>>  if (cmd->stop_src & TRIG_EXT)
>> -tmp++;
>> -if (tmp > 1)
>> +err++;
>> +if (err > 1)
>>  err |= -EINVAL;
>>
>>  if (err)
>
> That's wrong and breaks when any of the _src are set to TRIG_EXT.  It 
> also disregards any errors from step 2a.  It would have worked if you 
> had just replaced 'tmp' with 'arg' in the original version.

Sorry about that. I blame lack of sleep

Hartley



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: sep: fix coding style issue

2014-05-06 Thread Clément Calmels
This is a patch to fix coding style issue found by
scripts/checkpatch.pl utility.

Signed-off-by: Clément Calmels 
---
 drivers/staging/sep/sep_dev.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/staging/sep/sep_dev.h b/drivers/staging/sep/sep_dev.h
index 5f6a07f..5faeefa1 100644
--- a/drivers/staging/sep/sep_dev.h
+++ b/drivers/staging/sep/sep_dev.h
@@ -139,12 +139,14 @@ struct sep_queue_info {
 static inline void sep_write_reg(struct sep_device *dev, int reg, u32 value)
 {
void __iomem *addr = dev->reg_addr + reg;
+
writel(value, addr);
 }
 
 static inline u32 sep_read_reg(struct sep_device *dev, int reg)
 {
void __iomem *addr = dev->reg_addr + reg;
+
return readl(addr);
 }
 
@@ -152,6 +154,7 @@ static inline u32 sep_read_reg(struct sep_device *dev, int 
reg)
 static inline void sep_wait_sram_write(struct sep_device *dev)
 {
u32 reg_val;
+
do {
reg_val = sep_read_reg(dev, HW_SRAM_DATA_READY_REG_ADDR);
} while (!(reg_val & 1));
-- 
2.0.0.rc0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 4/4] staging: comedi: amplc_dio200_common: remove 'continuous' from subdevice private data

2014-05-06 Thread H Hartley Sweeten
This member of the subdevice private data can be determined from the
cmd->stop_src. Do that instead.

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---

v2: fix the subject as pointed out by Ian Abbott

 drivers/staging/comedi/drivers/amplc_dio200_common.c | 18 +-
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c 
b/drivers/staging/comedi/drivers/amplc_dio200_common.c
index ee18537..5125bf0 100644
--- a/drivers/staging/comedi/drivers/amplc_dio200_common.c
+++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c
@@ -130,7 +130,6 @@ struct dio200_subdev_intr {
unsigned int enabled_isns;
unsigned int stopcount;
bool active:1;
-   bool continuous:1;
 };
 
 static inline const struct dio200_layout *
@@ -259,7 +258,7 @@ static int dio200_start_intr(struct comedi_device *dev,
struct comedi_cmd *cmd = &s->async->cmd;
int retval = 0;
 
-   if (!subpriv->continuous && subpriv->stopcount == 0) {
+   if (cmd->stop_src == TRIG_COUNT && subpriv->stopcount == 0) {
/* An empty acquisition! */
s->async->events |= COMEDI_CB_EOA;
subpriv->active = false;
@@ -311,6 +310,7 @@ static void dio200_read_scan_intr(struct comedi_device *dev,
  unsigned int triggered)
 {
struct dio200_subdev_intr *subpriv = s->private;
+   struct comedi_cmd *cmd = &s->async->cmd;
unsigned short val;
unsigned int n, ch, len;
 
@@ -332,8 +332,7 @@ static void dio200_read_scan_intr(struct comedi_device *dev,
}
 
/* Check for end of acquisition. */
-   if (!subpriv->continuous) {
-   /* stop_src == TRIG_COUNT */
+   if (cmd->stop_src == TRIG_COUNT) {
if (subpriv->stopcount > 0) {
subpriv->stopcount--;
if (subpriv->stopcount == 0) {
@@ -512,17 +511,10 @@ static int dio200_subdev_intr_cmd(struct comedi_device 
*dev,
subpriv->active = true;
 
/* Set up end of acquisition. */
-   switch (cmd->stop_src) {
-   case TRIG_COUNT:
-   subpriv->continuous = false;
+   if (cmd->stop_src == TRIG_COUNT)
subpriv->stopcount = cmd->stop_arg;
-   break;
-   default:
-   /* TRIG_NONE */
-   subpriv->continuous = true;
+   else/* TRIG_NONE */
subpriv->stopcount = 0;
-   break;
-   }
 
if (cmd->start_src == TRIG_INT)
s->async->inttrig = dio200_inttrig_start_intr;
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: lustre: remove unused variables

2014-05-06 Thread Fredrick Prashanth John Berchmans
On Tue, May 6, 2014 at 7:56 AM, Emil Goode  wrote:
> The following commit left some unused variables behind.
>
> commit 80db2734acbc78db12798cfb611d6acc7fe389e6
> Author: Fredrick John Berchmans 
> Date:   Fri May 2 19:50:15 2014 -0700
>
> staging: lustre use kernel socket sockopt apis
>
> Signed-off-by: Emil Goode 
> ---
>  drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c |2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c 
> b/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
> index 4153b4a..ac3a444 100644
> --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
> +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
> @@ -46,10 +46,8 @@
>  int
>  libcfs_sock_ioctl(int cmd, unsigned long arg)
>  {
> -   mm_segment_toldmm = get_fs();
> struct socket  *sock;
> int  rc;
> -   struct file*sock_filp;
>
> rc = sock_create (PF_INET, SOCK_STREAM, 0, &sock);
> if (rc != 0) {
> --
> 1.7.10.4
>

Hi Emil,

I have already submitted a patch for this.

Thanks,
Fredrick
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 4/4] staging: comedi: amplc_dio200_common: remove 'continuous' from subdevice private data

2014-05-06 Thread Ian Abbott

On 06/05/14 18:55, H Hartley Sweeten wrote:

This member of the subdevice private data can be determined from the
cmd->stop_src. Do that instead.

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---

v2: fix the subject as pointed out by Ian Abbott

  drivers/staging/comedi/drivers/amplc_dio200_common.c | 18 +-
  1 file changed, 5 insertions(+), 13 deletions(-)


Signed-off-by: Ian Abbott 

--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 05/24] staging: comedi: amplc_pci224: use comedi_fc helpers to validate timer args

2014-05-06 Thread H Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the
scan_begin_arg when the scan_begin_src is TRIG_TIMER.

For aesthetics reasons, rename the local variable 'tmp' to 'arg'.

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---

v2: fix a bug in the TRIG_EXT validation as pointed out by Ian Abbott

 drivers/staging/comedi/drivers/amplc_pci224.c | 28 +--
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c 
b/drivers/staging/comedi/drivers/amplc_pci224.c
index c2b352c..da4634e 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -719,7 +719,7 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct 
comedi_subdevice *s,
 {
struct pci224_private *devpriv = dev->private;
int err = 0;
-   unsigned int tmp;
+   unsigned int arg;
 
/* Step 1 : check if triggers are trivially valid */
 
@@ -746,14 +746,14 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct 
comedi_subdevice *s,
 * There's only one external trigger signal (which makes these
 * tests easier).  Only one thing can use it.
 */
-   tmp = 0;
+   arg = 0;
if (cmd->start_src & TRIG_EXT)
-   tmp++;
+   arg++;
if (cmd->scan_begin_src & TRIG_EXT)
-   tmp++;
+   arg++;
if (cmd->stop_src & TRIG_EXT)
-   tmp++;
-   if (tmp > 1)
+   arg++;
+   if (arg > 1)
err |= -EINVAL;
 
if (err)
@@ -786,10 +786,10 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct 
comedi_subdevice *s,
err |= cfc_check_trigger_arg_max(&cmd->scan_begin_arg,
 MAX_SCAN_PERIOD);
 
-   tmp = cmd->chanlist_len * CONVERT_PERIOD;
-   if (tmp < MIN_SCAN_PERIOD)
-   tmp = MIN_SCAN_PERIOD;
-   err |= cfc_check_trigger_arg_min(&cmd->scan_begin_arg, tmp);
+   arg = cmd->chanlist_len * CONVERT_PERIOD;
+   if (arg < MIN_SCAN_PERIOD)
+   arg = MIN_SCAN_PERIOD;
+   err |= cfc_check_trigger_arg_min(&cmd->scan_begin_arg, arg);
break;
case TRIG_EXT:
/* Force to external trigger 0. */
@@ -840,15 +840,13 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct 
comedi_subdevice *s,
/* Step 4: fix up any arguments. */
 
if (cmd->scan_begin_src == TRIG_TIMER) {
-   tmp = cmd->scan_begin_arg;
+   arg = cmd->scan_begin_arg;
/* Use two timers. */
i8253_cascade_ns_to_timer(I8254_OSC_BASE_10MHZ,
  &devpriv->cached_div1,
  &devpriv->cached_div2,
- &cmd->scan_begin_arg,
- cmd->flags);
-   if (tmp != cmd->scan_begin_arg)
-   err++;
+ &arg, cmd->flags);
+   err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, arg);
}
 
if (err)
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8192u: initialize array in C compliant way

2014-05-06 Thread Christopher Li
On Tue, May 6, 2014 at 1:47 AM, Dan Carpenter  wrote:
>> - boolsearch_dir[4] = {0, 0, 0, 0};
>> + boolsearch_dir[4] = {0};
>
> That's weird.  The original code is valid but it generates a sparse
> warning.
>
> drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:244:58: warning: 
> Initializer entry defined twice
> drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:244:61:   also defined 
> here
>
> It has something to do with "_Bool" types.  Changing it to "int" will
> also make the warning disappear.  I've CC'd the sparse list to see if
> anyone knows what's happening.

This is easy reproducible with a small test case. It is a sparse bug for sure.

Let me take a look.

Chris
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8188eu: Fixed prohibited spaces after open '('

2014-05-06 Thread Rémi Pommarel
This patch fixes all prohibited spaces  after open '(' checkpatch.pl errors
for rtl8188eu.

Signed-off-by: Remi Pommarel 
---
 drivers/staging/rtl8188eu/include/odm_debug.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/odm_debug.h 
b/drivers/staging/rtl8188eu/include/odm_debug.h
index e8c4cab..db7b44e 100644
--- a/drivers/staging/rtl8188eu/include/odm_debug.h
+++ b/drivers/staging/rtl8188eu/include/odm_debug.h
@@ -85,7 +85,7 @@
 /*Export Marco Definition---*/
 #define DbgPrint   pr_info
 #define RT_PRINTK(fmt, args...)\
-   DbgPrint( "%s(): " fmt, __func__, ## args);
+   DbgPrint("%s(): " fmt, __func__, ## args);
 
 #ifndef ASSERT
#define ASSERT(expr)
@@ -106,8 +106,8 @@
 
 #define ODM_RT_ASSERT(pDM_Odm, expr, fmt)  \
if (!(expr)) {  \
-   DbgPrint( "Assertion failed! %s at ..\n", #expr);   \
-   DbgPrint( "  ..%s,%s,line=%d\n", __FILE__,  \
+   DbgPrint("Assertion failed! %s at ..\n", #expr);\
+   DbgPrint("  ..%s,%s,line=%d\n", __FILE__,   \
__func__, __LINE__);\
RT_PRINTK fmt;  \
ASSERT(false);  \
-- 
1.8.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging/olpc_dcon: fix checkpatch warnings

2014-05-06 Thread Jens Frederich
Acked-by: Jens Frederich 

2014-05-06 18:32 GMT+02:00 Nicolas Joseph :
> WARNING: Missing a blank line after declarations
>
> Signed-off-by: Nicolas Joseph 
> ---
>  drivers/staging/olpc_dcon/olpc_dcon.c | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c 
> b/drivers/staging/olpc_dcon/olpc_dcon.c
> index 26b4ec5..eb83b28 100644
> --- a/drivers/staging/olpc_dcon/olpc_dcon.c
> +++ b/drivers/staging/olpc_dcon/olpc_dcon.c
> @@ -210,6 +210,7 @@ static void dcon_sleep(struct dcon_priv *dcon, bool sleep)
>
> if (sleep) {
> u8 pm = 0;
> +
> x = olpc_ec_cmd(EC_DCON_POWER_MODE, &pm, 1, NULL, 0);
> if (x)
> pr_warn("unable to force dcon to power down: %d!\n", x);
> @@ -240,6 +241,7 @@ static void dcon_sleep(struct dcon_priv *dcon, bool sleep)
>  static void dcon_load_holdoff(struct dcon_priv *dcon)
>  {
> struct timespec delta_t, now;
> +
> while (1) {
> getnstimeofday(&now);
> delta_t = timespec_sub(now, dcon->load_time);
> @@ -399,14 +401,15 @@ static ssize_t dcon_mode_show(struct device *dev,
> struct device_attribute *attr, char *buf)
>  {
> struct dcon_priv *dcon = dev_get_drvdata(dev);
> +
> return sprintf(buf, "%4.4X\n", dcon->disp_mode);
>  }
>
>  static ssize_t dcon_sleep_show(struct device *dev,
> struct device_attribute *attr, char *buf)
>  {
> -
> struct dcon_priv *dcon = dev_get_drvdata(dev);
> +
> return sprintf(buf, "%d\n", dcon->asleep);
>  }
>
> @@ -414,6 +417,7 @@ static ssize_t dcon_freeze_show(struct device *dev,
> struct device_attribute *attr, char *buf)
>  {
> struct dcon_priv *dcon = dev_get_drvdata(dev);
> +
> return sprintf(buf, "%d\n", dcon->curr_src == DCON_SOURCE_DCON ? 1 : 0);
>  }
>
> @@ -421,6 +425,7 @@ static ssize_t dcon_mono_show(struct device *dev,
> struct device_attribute *attr, char *buf)
>  {
> struct dcon_priv *dcon = dev_get_drvdata(dev);
> +
> return sprintf(buf, "%d\n", dcon->mono);
>  }
>
> @@ -534,6 +539,7 @@ static int dcon_bl_update(struct backlight_device *dev)
>  static int dcon_bl_get(struct backlight_device *dev)
>  {
> struct dcon_priv *dcon = bl_get_data(dev);
> +
> return dcon->bl_val;
>  }
>
> --
> 2.0.0.rc0
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH v2 00/20] staging: comedi: pass subdevice around instead of async

2014-05-06 Thread Hartley Sweeten
On Tuesday, May 06, 2014 5:12 AM, Ian Abbott wrote:
> For comedi subdevices that support asynchronous commands, the `async`
> member of `struct comedi_subdevice` points to a `struct comedi_async`
> allocated to manage asynchronous commands on that subdevice.  The
> pointer to this "async" structure is passed around by various functions
> and some of those functions need to get back to the "subdevice"
> structure from this pointer, so the "async" structure has a `subdevice`
> member pointing back to the `struct comedi_subdevice`.
>
> Since we can always get to the "async" structure from the "subdevice"
> structure, we can just pass around the pointer to the subdevice instead
> of the pointer to the async structure.  Then the `subdevice` member of
> `struct comedi_async` is no longer required and can be removed.
>
> v2: Rebased to current staging-next due to merge conflicts.  The first
> two patches from v1 have already been applied, so the ordinals of
> the remaining patches have been shuffled down two places.

Reviewed-by: H Hartley Sweeten 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtl8188eu: Fixed prohibited spaces after open '('

2014-05-06 Thread Remi Pommarel
Oups sorry msmtp messed up the from mail address. Do you want me to
re-submit this or you can fix it while applying the patch ?

-- 
Remi Pommarel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtl8188eu: Fixed prohibited spaces after open '('

2014-05-06 Thread Dan Carpenter
On Tue, May 06, 2014 at 11:10:11PM +0200, Remi Pommarel wrote:
> Oups sorry msmtp messed up the from mail address. Do you want me to
> re-submit this or you can fix it while applying the patch ?
> 

Best to fix it yourself and Greg can take which ever version is easiest.

https://www.google.com/search?q=how+to+send+a+v2+patch

regards,
dan carpenter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtl8188eu: Fixed prohibited spaces after open '('

2014-05-06 Thread Remi Pommarel
On Wed, May 07, 2014 at 12:27:21AM +0300, Dan Carpenter wrote:
> Best to fix it yourself and Greg can take which ever version is easiest.

Ok thank you so I'll re-submitted it.

Regards

-- 
Remi Pommarel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 05/24] staging: comedi: amplc_pci224: use comedi_fc helpers to validate timer args

2014-05-06 Thread Ian Abbott

On 06/05/14 20:26, H Hartley Sweeten wrote:

Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the
scan_begin_arg when the scan_begin_src is TRIG_TIMER.

For aesthetics reasons, rename the local variable 'tmp' to 'arg'.

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---

v2: fix a bug in the TRIG_EXT validation as pointed out by Ian Abbott

  drivers/staging/comedi/drivers/amplc_pci224.c | 28 +--
  1 file changed, 13 insertions(+), 15 deletions(-)


Reviewed-by: Ian Abbott 

--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8188eu: Fixed prohibited spaces after open '('

2014-05-06 Thread Remi Pommarel
This patch fixes all prohibited spaces  after open '(' checkpatch.pl errors
for rtl8188eu.

Signed-off-by: Remi Pommarel 
---
 drivers/staging/rtl8188eu/include/odm_debug.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/odm_debug.h 
b/drivers/staging/rtl8188eu/include/odm_debug.h
index e8c4cab..db7b44e 100644
--- a/drivers/staging/rtl8188eu/include/odm_debug.h
+++ b/drivers/staging/rtl8188eu/include/odm_debug.h
@@ -85,7 +85,7 @@
 /*Export Marco Definition---*/
 #define DbgPrint   pr_info
 #define RT_PRINTK(fmt, args...)\
-   DbgPrint( "%s(): " fmt, __func__, ## args);
+   DbgPrint("%s(): " fmt, __func__, ## args);
 
 #ifndef ASSERT
#define ASSERT(expr)
@@ -106,8 +106,8 @@
 
 #define ODM_RT_ASSERT(pDM_Odm, expr, fmt)  \
if (!(expr)) {  \
-   DbgPrint( "Assertion failed! %s at ..\n", #expr);   \
-   DbgPrint( "  ..%s,%s,line=%d\n", __FILE__,  \
+   DbgPrint("Assertion failed! %s at ..\n", #expr);\
+   DbgPrint("  ..%s,%s,line=%d\n", __FILE__,   \
__func__, __LINE__);\
RT_PRINTK fmt;  \
ASSERT(false);  \
-- 
1.8.5.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] locks: ensure that fl_owner is always initialized properly in flock and lease codepaths

2014-05-06 Thread Gregory Farnum
The Ceph bit is fine.
Acked-by: Greg Farnum 


On Mon, Apr 28, 2014 at 10:50 AM, Jeff Layton  wrote:
> Currently, the fl_owner isn't set for flock locks. Some filesystems use
> byte-range locks to simulate flock locks and there is a common idiom in
> those that does:
>
> fl->fl_owner = (fl_owner_t)filp;
> fl->fl_start = 0;
> fl->fl_end = OFFSET_MAX;
>
> Since flock locks are generally "owned" by the open file description,
> move this into the common flock lock setup code. The fl_start and fl_end
> fields are already set appropriately, so remove the unneeded setting of
> that in flock ops in those filesystems as well.
>
> Finally, the lease code also sets the fl_owner as if they were owned by
> the process and not the open file description. This is incorrect as
> leases have the same ownership semantics as flock locks. Set them the
> same way. The lease code doesn't actually use the fl_owner value for
> anything, so this is more for consistency's sake than a bugfix.
>
> Reported-by: Trond Myklebust 
> Signed-off-by: Jeff Layton 
> ---
>  drivers/staging/lustre/lustre/llite/file.c | 17 ++---
>  fs/9p/vfs_file.c   |  3 ---
>  fs/afs/flock.c |  4 
>  fs/ceph/locks.c| 10 ++
>  fs/fuse/file.c |  1 -
>  fs/locks.c |  4 +++-
>  fs/nfs/file.c  |  4 
>  7 files changed, 11 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/llite/file.c 
> b/drivers/staging/lustre/lustre/llite/file.c
> index 8e844a6371e0..760ccd83f1f7 100644
> --- a/drivers/staging/lustre/lustre/llite/file.c
> +++ b/drivers/staging/lustre/lustre/llite/file.c
> @@ -2691,20 +2691,15 @@ int ll_file_flock(struct file *file, int cmd, struct 
> file_lock *file_lock)
>
> ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FLOCK, 1);
>
> -   if (file_lock->fl_flags & FL_FLOCK) {
> +   if (file_lock->fl_flags & FL_FLOCK)
> LASSERT((cmd == F_SETLKW) || (cmd == F_SETLK));
> -   /* flocks are whole-file locks */
> -   flock.l_flock.end = OFFSET_MAX;
> -   /* For flocks owner is determined by the local file 
> descriptor*/
> -   flock.l_flock.owner = (unsigned long)file_lock->fl_file;
> -   } else if (file_lock->fl_flags & FL_POSIX) {
> -   flock.l_flock.owner = (unsigned long)file_lock->fl_owner;
> -   flock.l_flock.start = file_lock->fl_start;
> -   flock.l_flock.end = file_lock->fl_end;
> -   } else {
> +   else if (!(file_lock->fl_flags & FL_POSIX))
> return -EINVAL;
> -   }
> +
> +   flock.l_flock.owner = (unsigned long)file_lock->fl_owner;
> flock.l_flock.pid = file_lock->fl_pid;
> +   flock.l_flock.start = file_lock->fl_start;
> +   flock.l_flock.end = file_lock->fl_end;
>
> /* Somewhat ugly workaround for svc lockd.
>  * lockd installs custom fl_lmops->lm_compare_owner that checks
> diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
> index d8223209d4b1..59e3fe3d56c0 100644
> --- a/fs/9p/vfs_file.c
> +++ b/fs/9p/vfs_file.c
> @@ -352,9 +352,6 @@ static int v9fs_file_flock_dotl(struct file *filp, int 
> cmd,
> invalidate_mapping_pages(&inode->i_data, 0, -1);
> }
> /* Convert flock to posix lock */
> -   fl->fl_owner = (fl_owner_t)filp;
> -   fl->fl_start = 0;
> -   fl->fl_end = OFFSET_MAX;
> fl->fl_flags |= FL_POSIX;
> fl->fl_flags ^= FL_FLOCK;
>
> diff --git a/fs/afs/flock.c b/fs/afs/flock.c
> index a8cf2cff836c..4baf1d2b39e4 100644
> --- a/fs/afs/flock.c
> +++ b/fs/afs/flock.c
> @@ -555,10 +555,6 @@ int afs_flock(struct file *file, int cmd, struct 
> file_lock *fl)
> return -ENOLCK;
>
> /* we're simulating flock() locks using posix locks on the server */
> -   fl->fl_owner = (fl_owner_t) file;
> -   fl->fl_start = 0;
> -   fl->fl_end = OFFSET_MAX;
> -
> if (fl->fl_type == F_UNLCK)
> return afs_do_unlk(file, fl);
> return afs_do_setlk(file, fl);
> diff --git a/fs/ceph/locks.c b/fs/ceph/locks.c
> index d94ba0df9f4d..db8c1ca15d72 100644
> --- a/fs/ceph/locks.c
> +++ b/fs/ceph/locks.c
> @@ -52,10 +52,7 @@ static int ceph_lock_message(u8 lock_type, u16 operation, 
> struct file *file,
> else
> length = fl->fl_end - fl->fl_start + 1;
>
> -   if (lock_type == CEPH_LOCK_FCNTL)
> -   owner = secure_addr(fl->fl_owner);
> -   else
> -   owner = secure_addr(fl->fl_file);
> +   owner = secure_addr(fl->fl_owner);
>
> dout("ceph_lock_message: rule: %d, op: %d, owner: %llx, pid: %llu, "
>  "start: %llu, length: %llu, wait: %d, type: %d", (int)lock_type,
> @@ -313,10 +310,7 @@ int lock_to_ceph_filelock(struct file_lock *lock,
> cephlock->length = cpu_to_le64

[PATCH] Add blank line after declarations

2014-05-06 Thread fernando . apesteguia
From: Fernando Apesteguia 

Add blank line after declarations and delete extra blank line at the
beginning of the function

Signed-off-by: Fernando Apesteguia 

---
 drivers/staging/silicom/bpctl_mod.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/silicom/bpctl_mod.c 
b/drivers/staging/silicom/bpctl_mod.c
index 7f3d884..266becf 100644
--- a/drivers/staging/silicom/bpctl_mod.c
+++ b/drivers/staging/silicom/bpctl_mod.c
@@ -7448,8 +7448,8 @@ static int bypass_proc_create_dev_sd(struct bpctl_dev 
*pbp_device_block)
 
 static int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block)
 {
-
struct bypass_pfs_sd *current_pfs = &pbp_device_block->bypass_pfs_set;
+
remove_proc_subtree(current_pfs->dir_name, bp_procfs_dir);
current_pfs->bypass_entry = NULL;
return 0;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: comedi: pcl730: add support for Diamond Systems PC/104 modules

2014-05-06 Thread H Hartley Sweeten
The Diamond Systems OPMM-1616-XT board is a PC/104 module with 16
optoisolated inputs and 16 relay outputs.

The PEARL-MM-P board is a PC/104 module with 16 relay outputs.

Both of these boards can be supported by the pcl730 driver.

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---
 drivers/staging/comedi/Kconfig  | 22 +++-
 drivers/staging/comedi/drivers/pcl730.c | 36 +
 2 files changed, 48 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index 703c5d4..5d56428 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -160,16 +160,18 @@ config COMEDI_PCL730
  Enable support for various simple ISA or PC/104 Digital I/O boards.
  These boards all use 8-bit I/O ports.
 
- Advantech PCL-730   isolated - 16 in/16 out  ttl - 16 in/16 out
- ICP ISO-730 isolated - 16 in/16 out  ttl - 16 in/16 out
- ADlink ACL-7130 isolated - 16 in/16 out  ttl - 16 in/16 out
- Advantech PCM-3730  isolated - 8 in/8 outttl - 16 in/16 out
- Advantech PCL-725   isolated - 8 in/8 out
- ICP P8R8-DIOisolated - 8 in/8 out
- ADlink ACL-7225bisolated - 16 in/16 out
- ICP P16R16-DIO  isolated - 16 in/16 out
- Advantech PCL-733   isolated - 32 in
- Advantech PCL-734   isolated - 32 out
+ Advantech PCL-730 iso - 16 in/16 out  ttl - 16 in/16 out
+ ICP ISO-730   iso - 16 in/16 out  ttl - 16 in/16 out
+ ADlink ACL-7130   iso - 16 in/16 out  ttl - 16 in/16 out
+ Advantech PCM-3730iso - 8 in/8 outttl - 16 in/16 out
+ Advantech PCL-725 iso - 8 in/8 out
+ ICP P8R8-DIO  iso - 8 in/8 out
+ ADlink ACL-7225b  iso - 16 in/16 out
+ ICP P16R16-DIOiso - 16 in/16 out
+ Advantech PCL-733 iso - 32 in
+ Advantech PCL-734 iso - 32 out
+ Diamond Systems OPMM-1616-XT  iso - 16 in/16 out
+ Diamond Systems PEARL-MM-Piso - 16 out
 
  To compile this driver as a module, choose M here: the module will be
  called pcl730.
diff --git a/drivers/staging/comedi/drivers/pcl730.c 
b/drivers/staging/comedi/drivers/pcl730.c
index 2baaf1d..7fb044c 100644
--- a/drivers/staging/comedi/drivers/pcl730.c
+++ b/drivers/staging/comedi/drivers/pcl730.c
@@ -17,6 +17,8 @@
  * (ICP) P16R16-DIO [p16r16dio]
  * (Advantech) PCL-733 [pcl733]
  * (Advantech) PCL-734 [pcl734]
+ * (Diamond Systems) OPMM-1616-XT [opmm-1616-xt]
+ * (Diamond Systems) PEARL-MM-P [prearl-mm-p]
  * Author: José Luis Sánchez (jsanch...@teleline.es)
  * Status: untested
  *
@@ -70,6 +72,27 @@
  * BASE+1  Isolated outputs 8-15 (write) or inputs 8-15 (read)
  * BASE+2  Isolated outputs 16-23 (write) or inputs 16-23 (read)
  * BASE+3  Isolated outputs 24-31 (write) or inputs 24-31 (read)
+ *
+ * The opmm-1616-xt board has this register mapping:
+ *
+ * BASE+0  Isolated outputs 0-7 (write) (read back)
+ * BASE+1  Isolated outputs 8-15 (write) (read back)
+ * BASE+2  Isolated inputs 0-7 (read)
+ * BASE+3  Isolated inputs 8-15 (read)
+ *
+ * These registers are not currently supported:
+ *
+ * BASE+2  Relay select register (write)
+ * BASE+3  Board reset control register (write)
+ * BASE+4  Interrupt control register (write)
+ * BASE+4  Change detect 7-0 status register (read)
+ * BASE+5  LED control register (write)
+ * BASE+5  Change detect 15-8 status register (read)
+ *
+ * The pearl-mm-p board has this register mapping:
+ *
+ * BASE+0  Isolated outputs 0-7 (write)
+ * BASE+1  Isolated outputs 8-15 (write)
  */
 
 struct pcl730_board {
@@ -158,6 +181,19 @@ static const struct pcl730_board pcl730_boards[] = {
.io_range   = 0x04,
.n_subdevs  = 1,
.n_iso_out_chan = 32,
+   }, {
+   .name   = "opmm-1616-xt",
+   .io_range   = 0x10,
+   .is_acl7225b= 1,
+   .has_readback   = 1,
+   .n_subdevs  = 2,
+   .n_iso_out_chan = 16,
+   .n_iso_in_chan  = 16,
+   }, {
+   .name   = "pearl-mm-p",
+   .io_range   = 0x02,
+   .n_subdevs  = 1,
+   .n_iso_out_chan = 16,
},
 };
 
-- 
1.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: android: fix coding style issue for Eudyptula Challenge in timed_gpio.c

2014-05-06 Thread John Church


Signed-off-by: John Church 
--- linux-next/drivers/staging/android/timed_gpio.c.orig2014-05-07 
00:20:50.429090320 +0100
+++ linux-next/drivers/staging/android/timed_gpio.c 2014-05-07 
00:22:09.204795052 +0100
@@ -92,7 +92,7 @@ static int timed_gpio_probe(struct platf
return -EBUSY;
 
gpio_data = devm_kzalloc(&pdev->dev,
-   sizeof(struct timed_gpio_data) * 
pdata->num_gpios,
+   sizeof(struct timed_gpio_data) * pdata->num_gpios,
GFP_KERNEL);
if (!gpio_data)
return -ENOMEM;
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: binder: fix usage of uninit scalar in binder_transaction()

2014-05-06 Thread Arve Hjønnevåg
On Sat, May 3, 2014 at 4:15 PM, Christian Engelmayer  wrote:
> Fix the error path when a cookie mismatch is detected. In that case the
> function jumps to the exit label without setting the uninitialized, local
> variable 'return_error'. Detected by Coverity - CID 201453.
>
> Signed-off-by: Christian Engelmayer 
> ---
> Compile tested and applies against branch staging-next of tree
> git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> ---
>  drivers/staging/android/binder.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/android/binder.c 
> b/drivers/staging/android/binder.c
> index 1f5e249..ca1b0e3 100644
> --- a/drivers/staging/android/binder.c
> +++ b/drivers/staging/android/binder.c
> @@ -1529,6 +1529,7 @@ static void binder_transaction(struct binder_proc *proc,
> proc->pid, thread->pid,
> (u64)fp->binder, node->debug_id,
> (u64)fp->cookie, (u64)node->cookie);
> +   return_error = BR_FAILED_REPLY;
> goto err_binder_get_ref_for_node_failed;
> }
> ref = binder_get_ref_for_node(target_proc, node);
> --
> 1.9.1

Acked-by: Arve Hjønnevåg 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: android: fix coding style issue for Eudyptula Challenge in timed_gpio.c

2014-05-06 Thread Greg KH
On Wed, May 07, 2014 at 12:44:31AM +0100, John Church wrote:
> 

> Signed-off-by: John Church 


What coding style issue?

You need to be specific in your body of your email, and put a blank line
after the signed-off-by and before the patch, otherwise the tools can
complain.

And drop the Eudyptula challenge line in subject:, it's not needed at
all.

Can you redo this and resend?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/13] staging: rtl8188eu: Remove struct zero_bulkout_context

2014-05-06 Thread navin . patidar
From: navin patidar 

Remove unused struct zero_bulkout_context.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c |7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c 
b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
index fb0bba8..ba2a8ab 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
@@ -39,13 +39,6 @@ unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 
addr)
return pipe;
 }
 
-struct zero_bulkout_context {
-   void *pbuf;
-   void *purb;
-   void *pirp;
-   void *padapter;
-};
-
 void usb_read_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
 {
 }
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 00/13]staging: rtl8188eu: Remove unused functions and variables

2014-05-06 Thread navin . patidar
From: navin patidar 

Following patches remove unused functions, variables and functions with empty
definition.

navin patidar (13):
  staging: rtl8188eu: Remove 'semaphore allrxreturnevt' from struct
recv_priv
  staging: rtl8188eu: Remove unused member variables of struct
recv_priv
  staging: rtl8188eu: Remove 'spinlock_t lock' from struct recv_priv
  staging: rtl8188eu: Remove struct zero_bulkout_context
  staging: rtl8188eu: Remove function rtw_os_recv_resource_init()
  staging: rtl8188eu: Remove function rtw_os_recv_resource_free()
  staging: rtl8188eu: Remove function rtw_hostapd_mlme_rx()
  staging: rtl8188eu: Remove function rtw_os_recvbuf_resource_free()
  staging: rtl8188eu: Remove unused inline function recvframe_push()
  staging: rtl8188eu: Remove unused inline function get_rx_status()
  staging: rtl8188eu: Remove 'void  *precvbuf' from struct recv_frame
  staging: rtl8188eu: Remove 'int frame_tag' from struct recv_frame
  staging: rtl8188eu: Remove 'u8 fragcnt' from struct recv_frame

 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c|2 --
 drivers/staging/rtl8188eu/core/rtw_recv.c|8 -
 drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c   |2 +-
 drivers/staging/rtl8188eu/hal/usb_ops_linux.c|1 -
 drivers/staging/rtl8188eu/include/recv_osdep.h   |4 ---
 drivers/staging/rtl8188eu/include/rtw_recv.h |   36 --
 drivers/staging/rtl8188eu/os_dep/recv_linux.c|   25 ---
 drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c |7 -
 8 files changed, 1 insertion(+), 84 deletions(-)

--
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/13] staging: rtl8188eu: Remove 'spinlock_t lock' from struct recv_priv

2014-05-06 Thread navin . patidar
From: navin patidar 

Remove unused variable 'spinlock_t lock'.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_recv.c|2 --
 drivers/staging/rtl8188eu/include/rtw_recv.h |1 -
 2 files changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c 
b/drivers/staging/rtl8188eu/core/rtw_recv.c
index a065a7f..5260fe5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -63,8 +63,6 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct 
adapter *padapter)
 
int res = _SUCCESS;
 
-   spin_lock_init(&precvpriv->lock);
-
_rtw_init_queue(&precvpriv->free_recv_queue);
_rtw_init_queue(&precvpriv->recv_pending_queue);
_rtw_init_queue(&precvpriv->uc_swdec_pending_queue);
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index d52cfe8..68c2ad5f 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -175,7 +175,6 @@ recv_thread(passive) ; returnpkt(dispatch)
 using enter_critical section to protect
 */
 struct recv_priv {
-   spinlock_t lock;
struct __queue free_recv_queue;
struct __queue recv_pending_queue;
struct __queue uc_swdec_pending_queue;
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/13] staging: rtl8188eu: Remove function rtw_os_recv_resource_init()

2014-05-06 Thread navin . patidar
From: navin patidar 

rtw_os_recv_resource_init() has empty defination, so we can remove it.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_recv.c  |2 --
 drivers/staging/rtl8188eu/include/recv_osdep.h |1 -
 drivers/staging/rtl8188eu/os_dep/recv_linux.c  |7 ---
 3 files changed, 10 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c 
b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 5260fe5..56b1ef1 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -71,8 +71,6 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct 
adapter *padapter)
 
precvpriv->free_recvframe_cnt = NR_RECVFRAME;
 
-   rtw_os_recv_resource_init(precvpriv, padapter);
-
precvpriv->pallocated_frame_buf = vzalloc(NR_RECVFRAME * sizeof(struct 
recv_frame) + RXFRAME_ALIGN_SZ);
 
if (precvpriv->pallocated_frame_buf == NULL) {
diff --git a/drivers/staging/rtl8188eu/include/recv_osdep.h 
b/drivers/staging/rtl8188eu/include/recv_osdep.h
index d76cc2d..f49ac56 100644
--- a/drivers/staging/rtl8188eu/include/recv_osdep.h
+++ b/drivers/staging/rtl8188eu/include/recv_osdep.h
@@ -39,7 +39,6 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 
bgroup);
 int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter);
 void rtw_free_recv_priv(struct recv_priv *precvpriv);
 
-int rtw_os_recv_resource_init(struct recv_priv *recvpr, struct adapter *adapt);
 int rtw_os_recv_resource_alloc(struct adapter *adapt,
   struct recv_frame *recvfr);
 void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c 
b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index 29ec014..c1fbe8d 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -28,13 +28,6 @@
 #include 
 #include 
 
-/* init os related resource in struct recv_priv */
-int rtw_os_recv_resource_init(struct recv_priv *precvpriv,
- struct adapter *padapter)
-{
-   return _SUCCESS;
-}
-
 /* alloc os related resource in struct recv_frame */
 int rtw_os_recv_resource_alloc(struct adapter *padapter,
   struct recv_frame *precvframe)
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/13] staging: rtl8188eu: Remove unused member variables of struct recv_priv

2014-05-06 Thread navin . patidar
From: navin patidar 

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/include/rtw_recv.h |6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 5b3bf29..d52cfe8 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -189,10 +189,6 @@ struct recv_priv {
u64 rx_drop;
u64 last_rx_bytes;
 
-   uint  rx_icv_err;
-   uint  rx_largepacket_crcerr;
-   uint  rx_smallpacket_crcerr;
-   uint  rx_middlepacket_crcerr;
uintff_hwaddr;
u8  rx_pending_cnt;
 
@@ -212,9 +208,7 @@ struct recv_priv {
u8 signal_strength;
u8 signal_qual;
u8 noise;
-   int RxSNRdB[2];
s8 RxRssi[2];
-   int FalseAlmCnt_all;
 
struct timer_list signal_stat_timer;
u32 signal_stat_sampling_interval;
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/13] staging: rtl8188eu: Remove 'semaphore allrxreturnevt' from struct recv_priv

2014-05-06 Thread navin . patidar
From: navin patidar 

Remove unused variable 'semaphore allrxreturnevt'.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_recv.c|2 --
 drivers/staging/rtl8188eu/include/rtw_recv.h |1 -
 2 files changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c 
b/drivers/staging/rtl8188eu/core/rtw_recv.c
index da26fa5c..a065a7f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -101,8 +101,6 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct 
adapter *padapter)
}
precvpriv->rx_pending_cnt = 1;
 
-   sema_init(&precvpriv->allrxreturnevt, 0);
-
res = rtw_hal_init_recv_priv(padapter);
 
_init_timer(&precvpriv->signal_stat_timer, padapter->pnetdev, 
RTW_TIMER_HDL_NAME(signal_stat), padapter);
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 971dd16..5b3bf29 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -193,7 +193,6 @@ struct recv_priv {
uint  rx_largepacket_crcerr;
uint  rx_smallpacket_crcerr;
uint  rx_middlepacket_crcerr;
-   struct semaphore allrxreturnevt;
uintff_hwaddr;
u8  rx_pending_cnt;
 
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/13] staging: rtl8188eu: Remove function rtw_hostapd_mlme_rx()

2014-05-06 Thread navin . patidar
From: navin patidar 

rtw_hostapd_mlme_rx() has empty defination, so we can remove it.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c  |2 --
 drivers/staging/rtl8188eu/include/recv_osdep.h |1 -
 drivers/staging/rtl8188eu/os_dep/recv_linux.c  |5 -
 3 files changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 55be52f..e854732 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -502,8 +502,6 @@ void mgt_dispatcher(struct adapter *padapter, struct 
recv_frame *precv_frame)
break;
default:
_mgt_dispatcher(padapter, ptable, precv_frame);
-   if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
-   rtw_hostapd_mlme_rx(padapter, precv_frame);
break;
}
 #else
diff --git a/drivers/staging/rtl8188eu/include/recv_osdep.h 
b/drivers/staging/rtl8188eu/include/recv_osdep.h
index 44caea9..5333598 100644
--- a/drivers/staging/rtl8188eu/include/recv_osdep.h
+++ b/drivers/staging/rtl8188eu/include/recv_osdep.h
@@ -33,7 +33,6 @@ int rtw_recv_indicatepkt(struct adapter *adapter,
 struct recv_frame *recv_frame);
 void rtw_recv_returnpacket(struct  net_device *cnxt, struct sk_buff *retpkt);
 
-void rtw_hostapd_mlme_rx(struct adapter *padapter, struct recv_frame *recv_fr);
 void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup);
 
 int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter);
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c 
b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index d1ce639..edb7969 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -95,11 +95,6 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 
bgroup)
&wrqu, (char *)&ev);
 }
 
-void rtw_hostapd_mlme_rx(struct adapter *padapter,
-struct recv_frame *precv_frame)
-{
-}
-
 int rtw_recv_indicatepkt(struct adapter *padapter,
 struct recv_frame *precv_frame)
 {
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/13] staging: rtl8188eu: Remove function rtw_os_recv_resource_free()

2014-05-06 Thread navin . patidar
From: navin patidar 

rtw_os_recv_resource_free() has empty defination, so we can remove it.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_recv.c  |2 --
 drivers/staging/rtl8188eu/include/recv_osdep.h |1 -
 drivers/staging/rtl8188eu/os_dep/recv_linux.c  |5 -
 3 files changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c 
b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 56b1ef1..db6ab4f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -117,8 +117,6 @@ void _rtw_free_recv_priv (struct recv_priv *precvpriv)
 
rtw_free_uc_swdec_pending_queue(padapter);
 
-   rtw_os_recv_resource_free(precvpriv);
-
if (precvpriv->pallocated_frame_buf) {
vfree(precvpriv->pallocated_frame_buf);
}
diff --git a/drivers/staging/rtl8188eu/include/recv_osdep.h 
b/drivers/staging/rtl8188eu/include/recv_osdep.h
index f49ac56..44caea9 100644
--- a/drivers/staging/rtl8188eu/include/recv_osdep.h
+++ b/drivers/staging/rtl8188eu/include/recv_osdep.h
@@ -41,7 +41,6 @@ void rtw_free_recv_priv(struct recv_priv *precvpriv);
 
 int rtw_os_recv_resource_alloc(struct adapter *adapt,
   struct recv_frame *recvfr);
-void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
 
 int rtw_os_recvbuf_resource_alloc(struct adapter *adapt, struct recv_buf *buf);
 int rtw_os_recvbuf_resource_free(struct adapter *adapt, struct recv_buf *buf);
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c 
b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index c1fbe8d..d1ce639 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -37,11 +37,6 @@ int rtw_os_recv_resource_alloc(struct adapter *padapter,
return _SUCCESS;
 }
 
-/* free os related resource in struct recv_frame */
-void rtw_os_recv_resource_free(struct recv_priv *precvpriv)
-{
-}
-
 /* alloc os related resource in struct recv_buf */
 int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
  struct recv_buf *precvbuf)
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/13] staging: rtl8188eu: Remove function rtw_os_recvbuf_resource_free()

2014-05-06 Thread navin . patidar
From: navin patidar 

Use usb_free_urb() instead of rtw_os_recvbuf_resource_free() to free URB.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |2 +-
 drivers/staging/rtl8188eu/include/recv_osdep.h |1 -
 drivers/staging/rtl8188eu/os_dep/recv_linux.c  |8 
 3 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c 
b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index 2b45564..0f6222d 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -97,7 +97,7 @@ void rtl8188eu_free_recv_priv(struct adapter *padapter)
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
 
for (i = 0; i < NR_RECVBUFF; i++) {
-   rtw_os_recvbuf_resource_free(padapter, precvbuf);
+   usb_free_urb(precvbuf->purb);
precvbuf++;
}
 
diff --git a/drivers/staging/rtl8188eu/include/recv_osdep.h 
b/drivers/staging/rtl8188eu/include/recv_osdep.h
index 5333598..a4fd957 100644
--- a/drivers/staging/rtl8188eu/include/recv_osdep.h
+++ b/drivers/staging/rtl8188eu/include/recv_osdep.h
@@ -42,7 +42,6 @@ int rtw_os_recv_resource_alloc(struct adapter *adapt,
   struct recv_frame *recvfr);
 
 int rtw_os_recvbuf_resource_alloc(struct adapter *adapt, struct recv_buf *buf);
-int rtw_os_recvbuf_resource_free(struct adapter *adapt, struct recv_buf *buf);
 
 void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf);
 
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c 
b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index edb7969..c0fa8fd 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -51,14 +51,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
return res;
 }
 
-/* free os related resource in struct recv_buf */
-int rtw_os_recvbuf_resource_free(struct adapter *padapter,
-struct recv_buf *precvbuf)
-{
-   usb_free_urb(precvbuf->purb);
-   return _SUCCESS;
-}
-
 void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup)
 {
union iwreq_data wrqu;
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/13] staging: rtl8188eu: Remove unused inline function get_rx_status()

2014-05-06 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/include/rtw_recv.h |5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index e5b4e10..dac2e0c 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -291,11 +291,6 @@ static inline u8 *get_rxmem(struct recv_frame *precvframe)
return precvframe->rx_head;
 }
 
-static inline u8 *get_rx_status(struct recv_frame *precvframe)
-{
-   return get_rxmem(precvframe);
-}
-
 static inline u8 *recvframe_pull(struct recv_frame *precvframe, int sz)
 {
/*  rx_data += sz; move rx_data sz bytes  hereafter */
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/13] staging: rtl8188eu: Remove 'void *precvbuf' from struct recv_frame

2014-05-06 Thread navin patidar
Remove unused variable 'void *precvbuf'.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/hal/usb_ops_linux.c |1 -
 drivers/staging/rtl8188eu/include/rtw_recv.h  |1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c 
b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
index d8fc747..fc73147 100644
--- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
@@ -333,7 +333,6 @@ static int recvbuf2recvframe(struct adapter *adapt, struct 
sk_buff *pskb)
}
 
_rtw_init_listhead(&precvframe->list);
-   precvframe->precvbuf = NULL;/* can't access the precvbuf 
for new arch. */
precvframe->len = 0;
 
update_recvframe_attrib_88e(precvframe, prxstat);
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index dac2e0c..e14ba98 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -261,7 +261,6 @@ struct recv_frame {
u8 *rx_data;
u8 *rx_tail;
u8 *rx_end;
-   void *precvbuf;
struct sta_info *psta;
/* for A-MPDU Rx reordering buffer control */
struct recv_reorder_ctrl *preorder_ctrl;
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/13] staging: rtl8188eu: Remove unused inline function recvframe_push()

2014-05-06 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/include/rtw_recv.h |   20 
 1 file changed, 20 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 68c2ad5f..e5b4e10 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -296,26 +296,6 @@ static inline u8 *get_rx_status(struct recv_frame 
*precvframe)
return get_rxmem(precvframe);
 }
 
-static inline u8 *recvframe_push(struct recv_frame *precvframe, int sz)
-{
-   /*  append data before rx_data */
-
-   /* add data to the start of recv_frame
- *
- *  This function extends the used data area of the recv_frame at the 
buffer
- *  start. rx_data must be still larger than rx_head, after pushing.
- */
-   if (precvframe == NULL)
-   return NULL;
-   precvframe->rx_data -= sz;
-   if (precvframe->rx_data < precvframe->rx_head) {
-   precvframe->rx_data += sz;
-   return NULL;
-   }
-   precvframe->len += sz;
-   return precvframe->rx_data;
-}
-
 static inline u8 *recvframe_pull(struct recv_frame *precvframe, int sz)
 {
/*  rx_data += sz; move rx_data sz bytes  hereafter */
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/13] staging: rtl8188eu: Remove 'u8 fragcnt' from struct recv_frame

2014-05-06 Thread navin patidar
Remove unused variable 'u8 fragcnt'.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/include/rtw_recv.h |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index b0fbdbd..f0c26ef 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -253,7 +253,6 @@ struct recv_frame {
struct sk_buff   *pkt;
struct sk_buff   *pkt_newalloc;
struct adapter  *adapter;
-   u8 fragcnt;
struct rx_pkt_attrib attrib;
uint  len;
u8 *rx_head;
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/13] staging: rtl8188eu: Remove 'int frame_tag' from struct recv_frame

2014-05-06 Thread navin patidar
Remove unused variable 'int frame_tag'.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/include/rtw_recv.h |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index e14ba98..b0fbdbd 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -254,7 +254,6 @@ struct recv_frame {
struct sk_buff   *pkt_newalloc;
struct adapter  *adapter;
u8 fragcnt;
-   int frame_tag;
struct rx_pkt_attrib attrib;
uint  len;
u8 *rx_head;
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: bcm: use kzalloc instead of kmalloc/memset

2014-05-06 Thread Daeseok Youn
Signed-off-by: Daeseok Youn 
---
 drivers/staging/bcm/InterfaceDld.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/bcm/InterfaceDld.c 
b/drivers/staging/bcm/InterfaceDld.c
index 005e460..e1925bd 100644
--- a/drivers/staging/bcm/InterfaceDld.c
+++ b/drivers/staging/bcm/InterfaceDld.c
@@ -53,8 +53,8 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp,
struct bcm_interface_adapter *psIntfAdapter = arg;
int bytes;
 
-   buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_DMA);
-   buff_readback = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB , GFP_DMA);
+   buff = kzalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_DMA);
+   buff_readback = kzalloc(MAX_TRANSFER_CTRL_BYTE_USB , GFP_DMA);
if (!buff || !buff_readback) {
kfree(buff);
kfree(buff_readback);
@@ -64,8 +64,6 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp,
 
is_config_file = (on_chip_loc == CONFIG_BEGIN_ADDR) ? 1 : 0;
 
-   memset(buff_readback, 0, MAX_TRANSFER_CTRL_BYTE_USB);
-   memset(buff, 0, MAX_TRANSFER_CTRL_BYTE_USB);
while (1) {
oldfs = get_fs();
set_fs(get_ds());
-- 
1.7.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: lustre: fix sparse warning "should it be static"

2014-05-06 Thread Toby Smith
Fix the following warning in lib-eq.c
warning: symbol 'lnet_eq_dequeue_event' was not declared. Should it be static?

Signed-off-by: Toby Smith 
---
 drivers/staging/lustre/lnet/lnet/lib-eq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-eq.c 
b/drivers/staging/lustre/lnet/lnet/lib-eq.c
index 7ce07f6..6e63c23 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-eq.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c
@@ -238,7 +238,7 @@ lnet_eq_enqueue_event(lnet_eq_t *eq, lnet_event_t *ev)
lnet_eq_wait_unlock();
 }
 
-int
+static int
 lnet_eq_dequeue_event(lnet_eq_t *eq, lnet_event_t *ev)
 {
int new_index = eq->eq_deq_seq & (eq->eq_size - 1);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: lustre: fix sparse warning "unexpected unlock"

2014-05-06 Thread Toby Smith
Fix the following warning in lib-eq.c
warning: context imbalance in 'lnet_eq_wait_locked' - unexpected unlock

Signed-off-by: Toby Smith 
---
 drivers/staging/lustre/lnet/lnet/lib-eq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-eq.c 
b/drivers/staging/lustre/lnet/lnet/lib-eq.c
index 6e63c23..d25dcd8 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-eq.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c
@@ -325,6 +325,7 @@ EXPORT_SYMBOL(LNetEQWait);
 
 static int
 lnet_eq_wait_locked(int *timeout_ms)
+__must_hold(&the_lnet.ln_eq_wait_lock)
 {
int tms = *timeout_ms;
int wait;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/2] staging: lustre: fix sparse warnings in lib-eq.c

2014-05-06 Thread Toby Smith
Fix warnings from sparse in lib-eq.c

Toby Smith (2):
  staging: lustre: fix sparse warning "should it be static"
  staging: lustre: fix sparse warning "unexpected unlock"

 drivers/staging/lustre/lnet/lnet/lib-eq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: android: fix coding style issue in timed_gpio.c

2014-05-06 Thread John Church
This patch fixes a coding style issue. It modifies a single line that 
was over 80 characters long.


Thanks,
John
Signed-off-by: John Church 

--- linux-next/drivers/staging/android/timed_gpio.c.orig2014-05-07 
00:20:50.429090320 +0100
+++ linux-next/drivers/staging/android/timed_gpio.c 2014-05-07 
00:22:09.204795052 +0100
@@ -92,7 +92,7 @@ static int timed_gpio_probe(struct platf
return -EBUSY;
 
gpio_data = devm_kzalloc(&pdev->dev,
-   sizeof(struct timed_gpio_data) * 
pdata->num_gpios,
+   sizeof(struct timed_gpio_data) * pdata->num_gpios,
GFP_KERNEL);
if (!gpio_data)
return -ENOMEM;
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel