[PATCH] Staging: iio: ad7192: replaced bool in struct

2018-12-21 Thread Amir Mahdi Ghorbanian
Replaced bool in struct with unsigned int bitfield to conserve space and
more clearly define size of varibales

Signed-off-by: Amir Mahdi Ghorbanian 
---
 drivers/staging/iio/adc/ad7192.h | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/iio/adc/ad7192.h b/drivers/staging/iio/adc/ad7192.h
index 7433a43..7d3e62f 100644
--- a/drivers/staging/iio/adc/ad7192.h
+++ b/drivers/staging/iio/adc/ad7192.h
@@ -35,13 +35,13 @@ struct ad7192_platform_data {
u16 vref_mv;
u8  clock_source_sel;
u32 ext_clk_hz;
-   boolrefin2_en;
-   boolrej60_en;
-   boolsinc3_en;
-   boolchop_en;
-   boolbuf_en;
-   boolunipolar_en;
-   boolburnout_curr_en;
+   unsigned intrefin2_en : 1;
+   unsigned intrej60_en : 1;
+   unsigned intsinc3_en : 1;
+   unsigned intchop_en : 1;
+   unsigned intbuf_en : 1;
+   unsigned intunipolar_en : 1;
+   unsigned intburnout_curr_en : 1;
 };
 
 #endif /* IIO_ADC_AD7192_H_ */
-- 
2.7.4



[PATCH 2/2] Staging: iio: adis16203: fixed a SPDX identifier tag mistake

2018-12-20 Thread Amir Mahdi Ghorbanian
Fixed a coding style mistake by adding the SPDX identifier tag to the
first line of the code

Signed-off-by: Amir Mahdi Ghorbanian 
---
 drivers/staging/iio/accel/adis16203.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/accel/adis16203.c 
b/drivers/staging/iio/accel/adis16203.c
index 5cc96c80..4ae5b74 100644
--- a/drivers/staging/iio/accel/adis16203.c
+++ b/drivers/staging/iio/accel/adis16203.c
@@ -1,9 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * ADIS16203 Programmable 360 Degrees Inclinometer
  *
  * Copyright 2010 Analog Devices Inc.
  *
- * Licensed under the GPL-2 or later.
  */
 
 #include 
-- 
2.7.4



[PATCH] Staging: iio: adis16240: fixed a SPDX identifier tag mistake

2018-12-19 Thread Amir Mahdi Ghorbanian
Fixed a coding style mistake by adding the SPDX identifier tag to the
first line of the code.

Signed-off-by: Amir Mahdi Ghorbanian 
---
 drivers/staging/iio/accel/adis16240.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/accel/adis16240.c 
b/drivers/staging/iio/accel/adis16240.c
index 24e525f..2c40189 100644
--- a/drivers/staging/iio/accel/adis16240.c
+++ b/drivers/staging/iio/accel/adis16240.c
@@ -1,9 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * ADIS16240 Programmable Impact Sensor and Recorder driver
  *
  * Copyright 2010 Analog Devices Inc.
  *
- * Licensed under the GPL-2 or later.
  */
 
 #include 
-- 
2.7.4



[PATCH] Staging: nvec: nvec: fixed check style issues

2018-12-16 Thread Amir Mahdi Ghorbanian
Replaced udelay() by the preferred usleep_range() function.

Signed-off-by: Amir Mahdi Ghorbanian 
---
 drivers/staging/nvec/nvec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 08027a3..6f35f92 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -626,7 +626,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
break;
case 2: /* first byte after command */
if (status == (I2C_SL_IRQ | RNW | RCVD)) {
-   udelay(33);
+   usleep_range(0, 33);
if (nvec->rx->data[0] != 0x01) {
dev_err(nvec->dev,
"Read without prior read command\n");
@@ -713,7 +713,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
 * We experience less incomplete messages with this delay than without
 * it, but we don't know why. Help is appreciated.
 */
-   udelay(100);
+   usleep_range(0, 100);
 
return IRQ_HANDLED;
 }
-- 
2.7.4



[PATCH 2/2] Staging: nvec: nvec: fixed check style issues

2018-12-16 Thread Amir Mahdi Ghorbanian
Fixed an endline open parenthesis issue and replaced udelay() by the
preferred usleep_range() function.

Signed-off-by: Amir Mahdi Ghorbanian 
---
 drivers/staging/nvec/nvec.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 08027a3..69eef7d 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -382,8 +382,10 @@ static void nvec_request_master(struct work_struct *work)
msg = list_first_entry(>tx_data, struct nvec_msg, node);
spin_unlock_irqrestore(>tx_lock, flags);
nvec_gpio_set_value(nvec, 0);
-   err = wait_for_completion_interruptible_timeout(
-   >ec_transfer, msecs_to_jiffies(5000));
+   done = >ec_transfer;
+   timeout = msecs_to_jiffies(5000);
+   err = wait_for_completion_interruptible_timeout(done,
+   timeout);
 
if (err == 0) {
dev_warn(nvec->dev, "timeout waiting for ec 
transfer\n");
@@ -626,7 +628,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
break;
case 2: /* first byte after command */
if (status == (I2C_SL_IRQ | RNW | RCVD)) {
-   udelay(33);
+   usleep_range(0, 33);
if (nvec->rx->data[0] != 0x01) {
dev_err(nvec->dev,
"Read without prior read command\n");
@@ -713,7 +715,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
 * We experience less incomplete messages with this delay than without
 * it, but we don't know why. Help is appreciated.
 */
-   udelay(100);
+   usleep_range(0, 100);
 
return IRQ_HANDLED;
 }
-- 
2.7.4



[PATCH 1/2] Staging: comedi: cb_pcidas: fixed a spelling mistake coding style issue

2018-12-16 Thread Amir Mahdi Ghorbanian
Fixed a coding style issue.

Signed-off-by: Amir Mahdi Ghorbanian 
---
 drivers/staging/comedi/drivers/cb_pcidas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c 
b/drivers/staging/comedi/drivers/cb_pcidas.c
index 8429d57..02ae00c 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas.c
@@ -116,7 +116,7 @@
 #define PCIDAS_TRIG_SEL_ANALOG PCIDAS_TRIG_SEL(3) /* ext. analog trigger */
 #define PCIDAS_TRIG_SEL_MASK   PCIDAS_TRIG_SEL(3) /* start trigger mask */
 #define PCIDAS_TRIG_POLBIT(2)  /* invert trigger (1602 only) */
-#define PCIDAS_TRIG_MODE   BIT(3)  /* edge/level trigerred (1602 only) */
+#define PCIDAS_TRIG_MODE   BIT(3)  /* edge/level triggered (1602 only) */
 #define PCIDAS_TRIG_EN BIT(4)  /* enable external start trigger */
 #define PCIDAS_TRIG_BURSTE BIT(5)  /* burst mode enable */
 #define PCIDAS_TRIG_CLRBIT(7)  /* clear external trigger */
-- 
2.7.4



[PATCH] Staging: comedi: cb_pcidas: fixed a spelling mistake coding style issue

2018-12-13 Thread Amir Mahdi Ghorbanian
Fixed a coding style issue.

Signed-off-by: Amir Mahdi Ghorbanian 
---
 drivers/staging/comedi/drivers/cb_pcidas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c 
b/drivers/staging/comedi/drivers/cb_pcidas.c
index 8429d57..02ae00c 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas.c
@@ -116,7 +116,7 @@
 #define PCIDAS_TRIG_SEL_ANALOG PCIDAS_TRIG_SEL(3) /* ext. analog trigger */
 #define PCIDAS_TRIG_SEL_MASK   PCIDAS_TRIG_SEL(3) /* start trigger mask */
 #define PCIDAS_TRIG_POLBIT(2)  /* invert trigger (1602 only) */
-#define PCIDAS_TRIG_MODE   BIT(3)  /* edge/level trigerred (1602 only) */
+#define PCIDAS_TRIG_MODE   BIT(3)  /* edge/level triggered (1602 only) */
 #define PCIDAS_TRIG_EN BIT(4)  /* enable external start trigger */
 #define PCIDAS_TRIG_BURSTE BIT(5)  /* burst mode enable */
 #define PCIDAS_TRIG_CLRBIT(7)  /* clear external trigger */
-- 
2.7.4



[PATCH] Staging: comedi: 8255: fixed an SPDX License Tag coding style issue

2018-12-13 Thread Amir Mahdi Ghorbanian
From: Amir Mahdi Ghorbanian 

Fixed a coding style issue.

Signed-off-by: Amir Mahdi Ghorbanian 
---
 drivers/staging/comedi/drivers/8255.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/8255.h 
b/drivers/staging/comedi/drivers/8255.h
index 6cd1339..ceae3ca 100644
--- a/drivers/staging/comedi/drivers/8255.h
+++ b/drivers/staging/comedi/drivers/8255.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * module/8255.h
  * Header file for 8255
-- 
2.7.4