[PATCH] Staging: iio: impedance-analyzer: ad5933: fix wrong comments

2016-12-07 Thread Nizam Haider
according to datasheet complete control register is of 2 bytes.
http://www.analog.com/media/en/technical-documentation/data-sheets/AD5933.pdf

Signed-off-by: Nizam Haider 
---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c 
b/drivers/staging/iio/impedance-analyzer/ad5933.c
index 3892a74..f39e03a 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -23,8 +23,8 @@
 #include 
 
 /* AD5933/AD5934 Registers */
-#define AD5933_REG_CONTROL_HB  0x80/* R/W, 2 bytes */
-#define AD5933_REG_CONTROL_LB  0x81/* R/W, 2 bytes */
+#define AD5933_REG_CONTROL_HB  0x80/* R/W, 1 byte */
+#define AD5933_REG_CONTROL_LB  0x81/* R/W, 1 byte */
 #define AD5933_REG_FREQ_START  0x82/* R/W, 3 bytes */
 #define AD5933_REG_FREQ_INC0x85/* R/W, 3 bytes */
 #define AD5933_REG_INC_NUM 0x88/* R/W, 2 bytes, 9 bit */
-- 
2.10.1



[PATCH] Gpu: drm: tilcdc: don't use devm_pinctrl_get_select_default() in probe

2015-12-06 Thread Nizam Haider
Since commit ab78029ecc34 (drivers/pinctrl: grab default handles from device
core), we can rely on device core for setting the default pins.

Signed-off-by: Nizam Haider 
---
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c 
b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
index 354c47c..205f461 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
@@ -18,8 +18,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include "tilcdc_drv.h"
 
@@ -312,7 +310,6 @@ static int tfp410_probe(struct platform_device *pdev)
struct device_node *i2c_node;
struct tfp410_module *tfp410_mod;
struct tilcdc_module *mod;
-   struct pinctrl *pinctrl;
uint32_t i2c_phandle;
int ret = -EINVAL;
 
@@ -331,10 +328,6 @@ static int tfp410_probe(struct platform_device *pdev)
 
tilcdc_module_init(mod, "tfp410", &tfp410_module_ops);
 
-   pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-   if (IS_ERR(pinctrl))
-   dev_warn(&pdev->dev, "pins are not configured\n");
-
if (of_property_read_u32(node, "i2c", &i2c_phandle)) {
dev_err(&pdev->dev, "could not get i2c bus phandle\n");
goto fail;
-- 
1.8.1.4

--
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/


[PATCH] Staging: iio: frequency: use dev_get_platdata()

2015-11-23 Thread Nizam Haider
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Nizam Haider 
---
 drivers/staging/iio/frequency/ad9832.c | 2 +-
 drivers/staging/iio/frequency/ad9834.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/frequency/ad9832.c 
b/drivers/staging/iio/frequency/ad9832.c
index 2b65faa..18b27a1 100644
--- a/drivers/staging/iio/frequency/ad9832.c
+++ b/drivers/staging/iio/frequency/ad9832.c
@@ -201,7 +201,7 @@ static const struct iio_info ad9832_info = {
 
 static int ad9832_probe(struct spi_device *spi)
 {
-   struct ad9832_platform_data *pdata = spi->dev.platform_data;
+   struct ad9832_platform_data *pdata = dev_get_platdata(&spi->dev);
struct iio_dev *indio_dev;
struct ad9832_state *st;
struct regulator *reg;
diff --git a/drivers/staging/iio/frequency/ad9834.c 
b/drivers/staging/iio/frequency/ad9834.c
index 6464f2c..6366216 100644
--- a/drivers/staging/iio/frequency/ad9834.c
+++ b/drivers/staging/iio/frequency/ad9834.c
@@ -318,7 +318,7 @@ static const struct iio_info ad9833_info = {
 
 static int ad9834_probe(struct spi_device *spi)
 {
-   struct ad9834_platform_data *pdata = spi->dev.platform_data;
+   struct ad9834_platform_data *pdata = dev_get_platdata(&spi->dev);
struct ad9834_state *st;
struct iio_dev *indio_dev;
struct regulator *reg;
-- 
1.8.1.4

--
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/


[PATCH] Staging: iio: light: tsl2x7x_core: use dev_get_platdata()

2015-11-23 Thread Nizam Haider
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Nizam Haider 
---
 drivers/staging/iio/light/tsl2x7x_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/light/tsl2x7x_core.c 
b/drivers/staging/iio/light/tsl2x7x_core.c
index 9dfd048..5b1c165 100644
--- a/drivers/staging/iio/light/tsl2x7x_core.c
+++ b/drivers/staging/iio/light/tsl2x7x_core.c
@@ -1898,7 +1898,7 @@ static int tsl2x7x_probe(struct i2c_client *clientp,
mutex_init(&chip->prox_mutex);
 
chip->tsl2x7x_chip_status = TSL2X7X_CHIP_UNKNOWN;
-   chip->pdata = clientp->dev.platform_data;
+   chip->pdata = dev_get_platdata(&clientp->dev);
chip->id = id->driver_data;
chip->chip_info =
&tsl2x7x_chip_info_tbl[device_channel_config[id->driver_data]];
-- 
1.8.1.4

--
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/


[PATCH] Staging: iio: adc: use dev_get_platdata()

2015-11-23 Thread Nizam Haider
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Nizam Haider 
---
 drivers/staging/iio/adc/ad7192.c  | 2 +-
 drivers/staging/iio/adc/ad7280a.c | 2 +-
 drivers/staging/iio/adc/ad7780.c  | 2 +-
 drivers/staging/iio/adc/ad7816.c  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
index bb40f37..9221103 100644
--- a/drivers/staging/iio/adc/ad7192.c
+++ b/drivers/staging/iio/adc/ad7192.c
@@ -609,7 +609,7 @@ static const struct iio_chan_spec ad7192_channels[] = {
 
 static int ad7192_probe(struct spi_device *spi)
 {
-   const struct ad7192_platform_data *pdata = spi->dev.platform_data;
+   const struct ad7192_platform_data *pdata = dev_get_platdata(&spi->dev);
struct ad7192_state *st;
struct iio_dev *indio_dev;
int ret, voltage_uv = 0;
diff --git a/drivers/staging/iio/adc/ad7280a.c 
b/drivers/staging/iio/adc/ad7280a.c
index 35acb1a..f45ebed 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -833,7 +833,7 @@ static const struct ad7280_platform_data 
ad7793_default_pdata = {
 
 static int ad7280_probe(struct spi_device *spi)
 {
-   const struct ad7280_platform_data *pdata = spi->dev.platform_data;
+   const struct ad7280_platform_data *pdata = dev_get_platdata(&spi->dev);
struct ad7280_state *st;
int ret;
const unsigned short tACQ_ns[4] = {465, 1010, 1460, 1890};
diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c
index 3abc778..9baa703 100644
--- a/drivers/staging/iio/adc/ad7780.c
+++ b/drivers/staging/iio/adc/ad7780.c
@@ -163,7 +163,7 @@ static const struct iio_info ad7780_info = {
 
 static int ad7780_probe(struct spi_device *spi)
 {
-   struct ad7780_platform_data *pdata = spi->dev.platform_data;
+   struct ad7780_platform_data *pdata = dev_get_platdata(&spi->dev);
struct ad7780_state *st;
struct iio_dev *indio_dev;
int ret, voltage_uv = 0;
diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index c8e1566..2226051 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -345,7 +345,7 @@ static int ad7816_probe(struct spi_device *spi_dev)
 {
struct ad7816_chip_info *chip;
struct iio_dev *indio_dev;
-   unsigned short *pins = spi_dev->dev.platform_data;
+   unsigned short *pins = dev_get_platdata(&spi_dev->dev);
int ret = 0;
int i;
 
-- 
1.8.1.4

--
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/


[PATCH] Gpio: use dev_get_platdata()

2015-11-23 Thread Nizam Haider
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Nizam Haider 
---
 drivers/gpio/gpio-ath79.c   | 2 +-
 drivers/gpio/gpio-davinci.c | 2 +-
 drivers/gpio/gpio-f7188x.c  | 2 +-
 drivers/gpio/gpio-octeon.c  | 2 +-
 drivers/gpio/gpio-sch311x.c | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c
index e5827a5..4c687c9 100644
--- a/drivers/gpio/gpio-ath79.c
+++ b/drivers/gpio/gpio-ath79.c
@@ -138,7 +138,7 @@ static const struct of_device_id ath79_gpio_of_match[] = {
 
 static int ath79_gpio_probe(struct platform_device *pdev)
 {
-   struct ath79_gpio_platform_data *pdata = pdev->dev.platform_data;
+   struct ath79_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct device_node *np = pdev->dev.of_node;
struct ath79_gpio_ctrl *ctrl;
struct resource *res;
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 5e71538..c2c87ba 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -149,7 +149,7 @@ davinci_gpio_get_pdata(struct platform_device *pdev)
u32 val;
 
if (!IS_ENABLED(CONFIG_OF) || !pdev->dev.of_node)
-   return pdev->dev.platform_data;
+   return dev_get_platdata(&pdev->dev);
 
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata)
diff --git a/drivers/gpio/gpio-f7188x.c b/drivers/gpio/gpio-f7188x.c
index 5e3c4fa..1917bb8 100644
--- a/drivers/gpio/gpio-f7188x.c
+++ b/drivers/gpio/gpio-f7188x.c
@@ -298,7 +298,7 @@ static int f7188x_gpio_probe(struct platform_device *pdev)
 {
int err;
int i;
-   struct f7188x_sio *sio = pdev->dev.platform_data;
+   struct f7188x_sio *sio = dev_get_platdata(&pdev->dev);
struct f7188x_gpio_data *data;
 
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c
index 62ae251..1251a04 100644
--- a/drivers/gpio/gpio-octeon.c
+++ b/drivers/gpio/gpio-octeon.c
@@ -128,7 +128,7 @@ out:
 
 static int octeon_gpio_remove(struct platform_device *pdev)
 {
-   struct gpio_chip *chip = pdev->dev.platform_data;
+   struct gpio_chip *chip = dev_get_platdata(&pdev->dev);
gpiochip_remove(chip);
return 0;
 }
diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c
index 0cb1141..da1f14f 100644
--- a/drivers/gpio/gpio-sch311x.c
+++ b/drivers/gpio/gpio-sch311x.c
@@ -229,7 +229,7 @@ static int sch311x_gpio_direction_out(struct gpio_chip 
*chip, unsigned offset,
 
 static int sch311x_gpio_probe(struct platform_device *pdev)
 {
-   struct sch311x_pdev_data *pdata = pdev->dev.platform_data;
+   struct sch311x_pdev_data *pdata = dev_get_platdata(&pdev->dev);
struct sch311x_gpio_priv *priv;
struct sch311x_gpio_block *block;
int err, i;
@@ -289,7 +289,7 @@ exit_err:
 
 static int sch311x_gpio_remove(struct platform_device *pdev)
 {
-   struct sch311x_pdev_data *pdata = pdev->dev.platform_data;
+   struct sch311x_pdev_data *pdata = dev_get_platdata(&pdev->dev);
struct sch311x_gpio_priv *priv = platform_get_drvdata(pdev);
int i;
 
-- 
1.8.1.4

--
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/


[PATCH] Staging: fbtft: fbtft-core: Removed unnecessary checks

2015-11-21 Thread Nizam Haider
The driver core clears the driver data to NULL after device_release
or on probe failure.

Signed-off-by: Nizam Haider 
---
 drivers/staging/fbtft/fbtft-core.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c 
b/drivers/staging/fbtft/fbtft-core.c
index b1e4516..6824d5f 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -989,8 +989,6 @@ reg_fail:
par->fbtftops.unregister_backlight(par);
if (spi)
spi_set_drvdata(spi, NULL);
-   if (par->pdev)
-   platform_set_drvdata(par->pdev, NULL);
 
return ret;
 }
@@ -1012,8 +1010,6 @@ int fbtft_unregister_framebuffer(struct fb_info *fb_info)
 
if (spi)
spi_set_drvdata(spi, NULL);
-   if (par->pdev)
-   platform_set_drvdata(par->pdev, NULL);
if (par->fbtftops.unregister_backlight)
par->fbtftops.unregister_backlight(par);
fbtft_sysfs_exit(par);
-- 
1.8.1.4

--
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/


[PATCH] IIO: adc: at91_adc.c Prefer kmalloc_array over kmalloc with multiply

2015-11-15 Thread Nizam Haider
So this patch swaps that use out for kmalloc_array instead.

Signed-off-by Nizam Haider 
---
 drivers/iio/adc/at91_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index 7b40925..f284cd6 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -742,7 +742,7 @@ static int at91_adc_of_get_resolution(struct at91_adc_state 
*st,
return count;
}
 
-   resolutions = kmalloc(count * sizeof(*resolutions), GFP_KERNEL);
+   resolutions = kmalloc_array(count, sizeof(*resolutions), GFP_KERNEL);
if (!resolutions)
return -ENOMEM;
 
-- 
1.8.1.4

--
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/


[PATCH] IIO: adc: xilinx-xadc-core.c: constify iio_buffer_setup_ops structure

2015-11-15 Thread Nizam Haider
structure iio_buffer_setup_ops is never modified, so declare it as const.

Signed-off-by: Nizam Haider 
---
 drivers/iio/adc/xilinx-xadc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/xilinx-xadc-core.c 
b/drivers/iio/adc/xilinx-xadc-core.c
index 0370624..c2b5f10 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -803,7 +803,7 @@ err:
return ret;
 }
 
-static struct iio_buffer_setup_ops xadc_buffer_ops = {
+static const struct iio_buffer_setup_ops xadc_buffer_ops = {
.preenable = &xadc_preenable,
.postenable = &iio_triggered_buffer_postenable,
.predisable = &iio_triggered_buffer_predisable,
-- 
1.8.1.4

--
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/


Re: [PATCH] Staging: iio: iio_simple_dummy_buffer: Typo in comments area

2015-11-15 Thread Nizam Haider
On Sat, Nov 14, 2015 at 05:21:48PM +, Jonathan Cameron wrote:
> On 14/11/15 09:28, Lars-Peter Clausen wrote:
> > On 11/14/2015 03:44 AM, Nizam Haider wrote:
> >> Fix simple typo in comments
> >>
> >> Signed-off-by: Nizam Haider 
> > 
> > Thanks for the patch.
> > 
> >> ---
> >>  drivers/staging/iio/iio_simple_dummy_buffer.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/staging/iio/iio_simple_dummy_buffer.c 
> >> b/drivers/staging/iio/iio_simple_dummy_buffer.c
> >> index cf44a6f..c8f889b 100644
> >> --- a/drivers/staging/iio/iio_simple_dummy_buffer.c
> >> +++ b/drivers/staging/iio/iio_simple_dummy_buffer.c
> >> @@ -64,7 +64,7 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, 
> >> void *p)
> >> * software scans: can be considered to be random access
> >> *   so efficient reading is just a case of minimal bus
> >> *   transactions.
> >> -   * software culled hardware scans:
> >> +   * software called hardware scans:
> > 
> > I don't think that's a typo. The non-patched version makes a lot more sense
> > then the patched vesion.
> Yup, that's me using some 'more unusual' English terminology, Perhaps the word
> 'dropped' would be clearer.
> 
> Also, that comment is now a little misleading as it is unusual / undesirable
Yes it is misleading now, non-patched version makes a lot more sense then 
patched
version.
but because of unusual english, should i use dropped and to send new patch or 
to just
leave it.
(it would be bit easy to understand in first shot with "dropped".)

Nizam
> to now do this in an individual driver.  The core demux code should take care
> of it.
> 
> Hmm.. I'll make a note to reread the comments in that driver and see if any
> others could do with a refresh.
> 
> Jonathan
> > 
> >> *   occasionally a driver may process the nearest hardware
> >> *   scan to avoid storing elements that are not desired. This
> >> *   is the fiddliest option by far.
> >>
> > 
> 
--
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/


[PATCH] Staging: dgnc: dgnc_neo.c: Coding Style issue (should be space before asterisk).

2015-11-14 Thread Nizam Haider
From: Nizam Haider 

Patch will add a space in commentary line.

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 3cf4783..4ef157f 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1784,7 +1784,7 @@ static void neo_vpd(struct dgnc_board *brd)
}
 
if  (((brd->vpd[0x08] != 0x82) &&  /* long resource name tag */
- (brd->vpd[0x10] != 0x82)) || /* long resource name tag (PCI-66 
files)*/
+ (brd->vpd[0x10] != 0x82)) || /* long resource name tag (PCI-66 
files) */
  (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
 
memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE);
-- 
1.8.1.4

--
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/


[PATCH] Staging: dgnc: dgnc_neo.c: Coding Style issue (should be space before asterisk).

2015-11-14 Thread Nizam Haider
Patch will add a space in commentary line.

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 3cf4783..4ef157f 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1784,7 +1784,7 @@ static void neo_vpd(struct dgnc_board *brd)
}
 
if  (((brd->vpd[0x08] != 0x82) &&  /* long resource name tag */
- (brd->vpd[0x10] != 0x82)) || /* long resource name tag (PCI-66 
files)*/
+ (brd->vpd[0x10] != 0x82)) || /* long resource name tag (PCI-66 
files) */
  (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
 
memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE);
-- 
1.8.1.4

--
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/


[PATCH v3 4/5] Staging: dgnc: dgnc_neo.c Braces {} should be used on all arms of this statement

2015-11-14 Thread Nizam Haider
Fix Checlpatch warning
HECK: braces {} should be used on all arms of this statement

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 93ec375..3cf4783 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1108,9 +1108,9 @@ static void neo_copy_data_from_uart_to_queue(struct 
channel_t *ch)
 * On the other hand, if the UART IS in FIFO mode, then ask
 * the UART to give us an approximation of data it has RX'ed.
 */
-   if (!(ch->ch_flags & CH_FIFO_ENABLED))
+   if (!(ch->ch_flags & CH_FIFO_ENABLED)) {
total = 0;
-   else {
+   } else {
total = readb(&ch->ch_neo_uart->rfifo);
 
/*
-- 
1.8.1.4

--
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/


[PATCH v3 5/5] Staging: dgnc: dgnc_tty: Typo error dgnc_wmove comment

2015-11-14 Thread Nizam Haider
Fix Typo errror in the comment section of dgnc_wmove

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 48e4b90..b79eab0 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -448,7 +448,7 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
  * dgnc_wmove - Write data to transmit queue.
  *
  * ch  - Pointer to channel structure.
- * buf - Poiter to characters to be moved.
+ * buf - Pointer to characters to be moved.
  * n   - Number of characters to move.
  *
  *===*/
-- 
1.8.1.4

--
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/


[PATCH v3 2/5] Staging: dgnc: dgnc_neo.c: Logical continuations should be on the previous line

2015-11-14 Thread Nizam Haider
Fix Checkpatch warning
CHECK: Logical continuations should be on the previous line

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index cf5bfc7..76d9376 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -351,8 +351,8 @@ static inline void neo_clear_break(struct channel_t *ch, 
int force)
 
/* Turn break off, and unset some variables */
if (ch->ch_flags & CH_BREAK_SENDING) {
-   if (time_after_eq(jiffies, ch->ch_stop_sending_break)
-   || force) {
+   if (time_after_eq(jiffies, ch->ch_stop_sending_break) ||
+   force) {
unsigned char temp = readb(&ch->ch_neo_uart->lcr);
 
writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr);
@@ -1783,9 +1783,9 @@ static void neo_vpd(struct dgnc_board *brd)
brd->vpd[(i*2)+1] = (a >> 8) & 0xff;
}
 
-   if  (((brd->vpd[0x08] != 0x82) /* long resource name tag */
-   &&  (brd->vpd[0x10] != 0x82))   /* long resource name tag 
(PCI-66 files)*/
-   ||  (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
+   if  (((brd->vpd[0x08] != 0x82) &&  /* long resource name tag */
+ (brd->vpd[0x10] != 0x82)) || /* long resource name tag (PCI-66 
files)*/
+ (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
 
memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE);
} else {
-- 
1.8.1.4

--
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/


[PATCH v3 3/5] Staging: dgnc: dgnc_neo.c: Spaces preferred around operators

2015-11-14 Thread Nizam Haider
Fix Checkpatch warning
CHECK: spaces preferred around that ' '

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 76d9376..93ec375 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1628,7 +1628,7 @@ static void neo_uart_init(struct channel_t *ch)
 
/* Clear out UART and FIFO */
readb(&ch->ch_neo_uart->txrx);
-   writeb((UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|UART_FCR_CLEAR_XMIT), 
&ch->ch_neo_uart->isr_fcr);
+   writeb((UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | 
UART_FCR_CLEAR_XMIT), &ch->ch_neo_uart->isr_fcr);
readb(&ch->ch_neo_uart->lsr);
readb(&ch->ch_neo_uart->msr);
 
@@ -1779,8 +1779,8 @@ static void neo_vpd(struct dgnc_board *brd)
/* Store the VPD into our buffer */
for (i = 0; i < NEO_VPD_IMAGESIZE; i++) {
a = neo_read_eeprom(brd->re_map_membase, i);
-   brd->vpd[i*2] = a & 0xff;
-   brd->vpd[(i*2)+1] = (a >> 8) & 0xff;
+   brd->vpd[i * 2] = a & 0xff;
+   brd->vpd[(i * 2) + 1] = (a >> 8) & 0xff;
}
 
if  (((brd->vpd[0x08] != 0x82) &&  /* long resource name tag */
-- 
1.8.1.4

--
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/


[PATCH v3 1/5] Staging: dgnc: dgnc_neo.c: usleep_range is preferred over udelay

2015-11-14 Thread Nizam Haider
Fix ceckpatch warning

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 8106f52..cf5bfc7 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1335,7 +1335,7 @@ static void neo_flush_uart_write(struct channel_t *ch)
/* Check to see if the UART feels it completely flushed the 
FIFO. */
tmp = readb(&ch->ch_neo_uart->isr_fcr);
if (tmp & 4)
-   udelay(10);
+   usleep_range(10, 50);
else
break;
}
@@ -1363,7 +1363,7 @@ static void neo_flush_uart_read(struct channel_t *ch)
/* Check to see if the UART feels it completely flushed the 
FIFO. */
tmp = readb(&ch->ch_neo_uart->isr_fcr);
if (tmp & 2)
-   udelay(10);
+   usleep_range(10, 50);
else
break;
}
@@ -1588,7 +1588,7 @@ static void neo_assert_modem_signals(struct channel_t *ch)
neo_pci_posting_flush(ch->ch_bd);
 
/* Give time for the UART to actually raise/drop the signals */
-   udelay(10);
+   usleep_range(10, 50);
 }
 
 static void neo_send_start_character(struct channel_t *ch)
@@ -1600,7 +1600,7 @@ static void neo_send_start_character(struct channel_t *ch)
ch->ch_xon_sends++;
writeb(ch->ch_startc, &ch->ch_neo_uart->txrx);
neo_pci_posting_flush(ch->ch_bd);
-   udelay(10);
+   usleep_range(10, 50);
}
 }
 
@@ -1613,7 +1613,7 @@ static void neo_send_stop_character(struct channel_t *ch)
ch->ch_xoff_sends++;
writeb(ch->ch_stopc, &ch->ch_neo_uart->txrx);
neo_pci_posting_flush(ch->ch_bd);
-   udelay(10);
+   usleep_range(10, 50);
}
 }
 
-- 
1.8.1.4

--
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/


[PATCH] Staging: iio: iio_simple_dummy_buffer: Typo in comments area

2015-11-13 Thread Nizam Haider
Fix simple typo in comments

Signed-off-by: Nizam Haider 
---
 drivers/staging/iio/iio_simple_dummy_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/iio_simple_dummy_buffer.c 
b/drivers/staging/iio/iio_simple_dummy_buffer.c
index cf44a6f..c8f889b 100644
--- a/drivers/staging/iio/iio_simple_dummy_buffer.c
+++ b/drivers/staging/iio/iio_simple_dummy_buffer.c
@@ -64,7 +64,7 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void 
*p)
 * software scans: can be considered to be random access
 *   so efficient reading is just a case of minimal bus
 *   transactions.
-* software culled hardware scans:
+* software called hardware scans:
 *   occasionally a driver may process the nearest hardware
 *   scan to avoid storing elements that are not desired. This
 *   is the fiddliest option by far.
-- 
1.8.1.4

--
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/


[PATCH] Rtc: rtc-gemini.c: Remove unnecessary platform_set_drvdata()

2015-11-13 Thread Nizam Haider
The driver core clears the driver data to NULL after device_release
or on probe failure

Signed-off-by: Nizam Haider 
---
 drivers/rtc/rtc-gemini.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/rtc/rtc-gemini.c b/drivers/rtc/rtc-gemini.c
index e841846..f46b6d4 100644
--- a/drivers/rtc/rtc-gemini.c
+++ b/drivers/rtc/rtc-gemini.c
@@ -156,7 +156,6 @@ static int gemini_rtc_remove(struct platform_device *pdev)
struct gemini_rtc *rtc = platform_get_drvdata(pdev);
 
rtc_device_unregister(rtc->rtc_dev);
-   platform_set_drvdata(pdev, NULL);
 
return 0;
 }
-- 
1.8.1.4

--
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/


[PATCH v2 2/5] Staging: dgnc: dgnc_neo.c: Logical continuations should be on the previous line

2015-11-13 Thread Nizam Haider
Fix Checkpatch warning
CHECK: Logical continuations should be on the previous line

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index cf5bfc7..51462f9 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -351,8 +351,8 @@ static inline void neo_clear_break(struct channel_t *ch, 
int force)
 
/* Turn break off, and unset some variables */
if (ch->ch_flags & CH_BREAK_SENDING) {
-   if (time_after_eq(jiffies, ch->ch_stop_sending_break)
-   || force) {
+   if (time_after_eq(jiffies, ch->ch_stop_sending_break) ||
+   force) {
unsigned char temp = readb(&ch->ch_neo_uart->lcr);
 
writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr);
@@ -1783,9 +1783,9 @@ static void neo_vpd(struct dgnc_board *brd)
brd->vpd[(i*2)+1] = (a >> 8) & 0xff;
}
 
-   if  (((brd->vpd[0x08] != 0x82) /* long resource name tag */
-   &&  (brd->vpd[0x10] != 0x82))   /* long resource name tag 
(PCI-66 files)*/
-   ||  (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
+   if  (((brd->vpd[0x08] != 0x82) &&   /* long resource name tag */
+ (brd->vpd[0x10] != 0x82)) ||  /* long resource name tag (PCI-66 
files)*/
+ (brd->vpd[0x7F] != 0x78)) {   /* small resource end tag */
 
memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE);
} else {
-- 
1.8.1.4

--
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/


[PATCH v2 3/5] Staging: dgnc: dgnc_neo.c: Spaces preferred around operators

2015-11-13 Thread Nizam Haider
Fix Checkpatch warning
CHECK: spaces preferred around that ' '

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 51462f9..e980150 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1628,7 +1628,7 @@ static void neo_uart_init(struct channel_t *ch)
 
/* Clear out UART and FIFO */
readb(&ch->ch_neo_uart->txrx);
-   writeb((UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|UART_FCR_CLEAR_XMIT), 
&ch->ch_neo_uart->isr_fcr);
+   writeb((UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | 
UART_FCR_CLEAR_XMIT), &ch->ch_neo_uart->isr_fcr);
readb(&ch->ch_neo_uart->lsr);
readb(&ch->ch_neo_uart->msr);
 
@@ -1779,8 +1779,8 @@ static void neo_vpd(struct dgnc_board *brd)
/* Store the VPD into our buffer */
for (i = 0; i < NEO_VPD_IMAGESIZE; i++) {
a = neo_read_eeprom(brd->re_map_membase, i);
-   brd->vpd[i*2] = a & 0xff;
-   brd->vpd[(i*2)+1] = (a >> 8) & 0xff;
+   brd->vpd[i * 2] = a & 0xff;
+   brd->vpd[(i * 2) + 1] = (a >> 8) & 0xff;
}
 
if  (((brd->vpd[0x08] != 0x82) &&   /* long resource name tag */
-- 
1.8.1.4

--
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/


[PATCH v2 4/5] Staging: dgnc: dgnc_neo.c Braces {} should be used on all arms of this statement

2015-11-13 Thread Nizam Haider
Fix Checlpatch warning
HECK: braces {} should be used on all arms of this statement

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index e980150..99b230f 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1108,9 +1108,10 @@ static void neo_copy_data_from_uart_to_queue(struct 
channel_t *ch)
 * On the other hand, if the UART IS in FIFO mode, then ask
 * the UART to give us an approximation of data it has RX'ed.
 */
-   if (!(ch->ch_flags & CH_FIFO_ENABLED))
+   if (!(ch->ch_flags & CH_FIFO_ENABLED)) {
total = 0;
-   else {
+   }
+   else {
total = readb(&ch->ch_neo_uart->rfifo);
 
/*
-- 
1.8.1.4

--
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/


[PATCH v2 5/5] Staging: dgnc: dgnc_tty: Typo error dgnc_wmove comment

2015-11-13 Thread Nizam Haider
Fix Typo errror in the comment of dgnc_wmove

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 48e4b90..b79eab0 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -448,7 +448,7 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
  * dgnc_wmove - Write data to transmit queue.
  *
  * ch  - Pointer to channel structure.
- * buf - Poiter to characters to be moved.
+ * buf - Pointer to characters to be moved.
  * n   - Number of characters to move.
  *
  *===*/
-- 
1.8.1.4

--
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/


[PATCH v2 1/5] Staging: dgnc: dgnc_neo.c: usleep_range is preferred over udelay

2015-11-13 Thread Nizam Haider
Fix ceckpatch warning

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 8106f52..cf5bfc7 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1335,7 +1335,7 @@ static void neo_flush_uart_write(struct channel_t *ch)
/* Check to see if the UART feels it completely flushed the 
FIFO. */
tmp = readb(&ch->ch_neo_uart->isr_fcr);
if (tmp & 4)
-   udelay(10);
+   usleep_range(10, 50);
else
break;
}
@@ -1363,7 +1363,7 @@ static void neo_flush_uart_read(struct channel_t *ch)
/* Check to see if the UART feels it completely flushed the 
FIFO. */
tmp = readb(&ch->ch_neo_uart->isr_fcr);
if (tmp & 2)
-   udelay(10);
+   usleep_range(10, 50);
else
break;
}
@@ -1588,7 +1588,7 @@ static void neo_assert_modem_signals(struct channel_t *ch)
neo_pci_posting_flush(ch->ch_bd);
 
/* Give time for the UART to actually raise/drop the signals */
-   udelay(10);
+   usleep_range(10, 50);
 }
 
 static void neo_send_start_character(struct channel_t *ch)
@@ -1600,7 +1600,7 @@ static void neo_send_start_character(struct channel_t *ch)
ch->ch_xon_sends++;
writeb(ch->ch_startc, &ch->ch_neo_uart->txrx);
neo_pci_posting_flush(ch->ch_bd);
-   udelay(10);
+   usleep_range(10, 50);
}
 }
 
@@ -1613,7 +1613,7 @@ static void neo_send_stop_character(struct channel_t *ch)
ch->ch_xoff_sends++;
writeb(ch->ch_stopc, &ch->ch_neo_uart->txrx);
neo_pci_posting_flush(ch->ch_bd);
-   udelay(10);
+   usleep_range(10, 50);
}
 }
 
-- 
1.8.1.4

--
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/


[PATCH 1/2] Staging: dgnc: dgnc_neo.c: usleep_range is preferred over udelay

2015-11-13 Thread Nizam Haider
removed heckpatch warning

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 8106f52..cf5bfc7 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1335,7 +1335,7 @@ static void neo_flush_uart_write(struct channel_t *ch)
/* Check to see if the UART feels it completely flushed the 
FIFO. */
tmp = readb(&ch->ch_neo_uart->isr_fcr);
if (tmp & 4)
-   udelay(10);
+   usleep_range(10, 50);
else
break;
}
@@ -1363,7 +1363,7 @@ static void neo_flush_uart_read(struct channel_t *ch)
/* Check to see if the UART feels it completely flushed the 
FIFO. */
tmp = readb(&ch->ch_neo_uart->isr_fcr);
if (tmp & 2)
-   udelay(10);
+   usleep_range(10, 50);
else
break;
}
@@ -1588,7 +1588,7 @@ static void neo_assert_modem_signals(struct channel_t *ch)
neo_pci_posting_flush(ch->ch_bd);
 
/* Give time for the UART to actually raise/drop the signals */
-   udelay(10);
+   usleep_range(10, 50);
 }
 
 static void neo_send_start_character(struct channel_t *ch)
@@ -1600,7 +1600,7 @@ static void neo_send_start_character(struct channel_t *ch)
ch->ch_xon_sends++;
writeb(ch->ch_startc, &ch->ch_neo_uart->txrx);
neo_pci_posting_flush(ch->ch_bd);
-   udelay(10);
+   usleep_range(10, 50);
}
 }
 
@@ -1613,7 +1613,7 @@ static void neo_send_stop_character(struct channel_t *ch)
ch->ch_xoff_sends++;
writeb(ch->ch_stopc, &ch->ch_neo_uart->txrx);
neo_pci_posting_flush(ch->ch_bd);
-   udelay(10);
+   usleep_range(10, 50);
}
 }
 
-- 
1.8.1.4

--
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/


[PATCH 2/2] Staging: dgnc: dgnc_neo.c: checkpatch cleanup

2015-11-13 Thread Nizam Haider
This patch fixes several warning during checkpatch

355: CHECK: Logical continuations should be on the previous line
: CHECK: braces {} should be used on all arms of this statement
1631: CHECK: spaces preferred around that '|' (ctx:VxV)
1782: CHECK: spaces preferred around that '*' (ctx:VxV)
1783: CHECK: spaces preferred around that '*' (ctx:VxV)
1783: CHECK: spaces preferred around that '+' (ctx:VxV)
1787: CHECK: Logical continuations should be on the previous line
1788: CHECK: Logical continuations should be on the previous line

Signed-off-by: Nizam Haider 
---
 drivers/staging/dgnc/dgnc_neo.c | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index cf5bfc7..f7d83d3 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -351,8 +351,8 @@ static inline void neo_clear_break(struct channel_t *ch, 
int force)
 
/* Turn break off, and unset some variables */
if (ch->ch_flags & CH_BREAK_SENDING) {
-   if (time_after_eq(jiffies, ch->ch_stop_sending_break)
-   || force) {
+   if (time_after_eq(jiffies, ch->ch_stop_sending_break) ||
+   force) {
unsigned char temp = readb(&ch->ch_neo_uart->lcr);
 
writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr);
@@ -1108,9 +1108,10 @@ static void neo_copy_data_from_uart_to_queue(struct 
channel_t *ch)
 * On the other hand, if the UART IS in FIFO mode, then ask
 * the UART to give us an approximation of data it has RX'ed.
 */
-   if (!(ch->ch_flags & CH_FIFO_ENABLED))
+   if (!(ch->ch_flags & CH_FIFO_ENABLED)) {
total = 0;
-   else {
+   }
+   else {
total = readb(&ch->ch_neo_uart->rfifo);
 
/*
@@ -1628,7 +1629,7 @@ static void neo_uart_init(struct channel_t *ch)
 
/* Clear out UART and FIFO */
readb(&ch->ch_neo_uart->txrx);
-   writeb((UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|UART_FCR_CLEAR_XMIT), 
&ch->ch_neo_uart->isr_fcr);
+   writeb((UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | 
UART_FCR_CLEAR_XMIT), &ch->ch_neo_uart->isr_fcr);
readb(&ch->ch_neo_uart->lsr);
readb(&ch->ch_neo_uart->msr);
 
@@ -1779,13 +1780,13 @@ static void neo_vpd(struct dgnc_board *brd)
/* Store the VPD into our buffer */
for (i = 0; i < NEO_VPD_IMAGESIZE; i++) {
a = neo_read_eeprom(brd->re_map_membase, i);
-   brd->vpd[i*2] = a & 0xff;
-   brd->vpd[(i*2)+1] = (a >> 8) & 0xff;
+   brd->vpd[i * 2] = a & 0xff;
+   brd->vpd[(i * 2) + 1] = (a >> 8) & 0xff;
}
 
-   if  (((brd->vpd[0x08] != 0x82) /* long resource name tag */
-   &&  (brd->vpd[0x10] != 0x82))   /* long resource name tag 
(PCI-66 files)*/
-   ||  (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
+   if  (((brd->vpd[0x08] != 0x82) &&  /* long resource name tag */
+ (brd->vpd[0x10] != 0x82)) ||   /* long resource name tag 
(PCI-66 files)*/
+ (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
 
memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE);
} else {
-- 
1.8.1.4

--
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/


[PATCH] iio: adc: mxs-lradc: Prefer using the BIT macro

2015-11-09 Thread Nizam Haider
Replaces bit shifting on 1 with the BIT(x) macro

Signed-off-by: Nizam Haider 
---
 drivers/staging/iio/adc/mxs-lradc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/adc/mxs-lradc.c 
b/drivers/staging/iio/adc/mxs-lradc.c
index d997d9c..5f1375c 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -324,7 +324,7 @@ struct mxs_lradc {
 #defineLRADC_DELAY_TRIGGER(x) \
(((x) << LRADC_DELAY_TRIGGER_LRADCS_OFFSET) & \
LRADC_DELAY_TRIGGER_LRADCS_MASK)
-#defineLRADC_DELAY_KICK(1 << 20)
+#defineLRADC_DELAY_KICKBIT(20)
 #defineLRADC_DELAY_TRIGGER_DELAYS_MASK (0xf << 16)
 #defineLRADC_DELAY_TRIGGER_DELAYS_OFFSET   16
 #defineLRADC_DELAY_TRIGGER_DELAYS(x) \
-- 
1.8.1.4

--
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/


[PATCH] iio: adc: ad7793: removed unnecessary else.

2015-11-09 Thread Nizam Haider
Else is not generally useful after a break or return.

Signed-off-by: Nizam Haider 
---
 drivers/iio/adc/ad7793.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c
index eea0c79..3bc5655 100644
--- a/drivers/iio/adc/ad7793.c
+++ b/drivers/iio/adc/ad7793.c
@@ -478,10 +478,9 @@ static int ad7793_read_raw(struct iio_dev *indio_dev,
*val2 = st->
scale_avail[(st->conf >> 8) & 0x7][1];
return IIO_VAL_INT_PLUS_NANO;
-   } else {
-   /* 1170mV / 2^23 * 6 */
-   scale_uv = (1170ULL * 10ULL * 6ULL);
}
+   /* 1170mV / 2^23 * 6 */
+   scale_uv = (1170ULL * 10ULL * 6ULL);
break;
case IIO_TEMP:
/* 1170mV / 0.81 mV/C / 2^23 */
-- 
1.8.1.4

--
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/


[PATCH] Staging: rts5208: xd: Fixed checkpatch warning

2015-06-08 Thread Nizam Haider
Fixed a warning, else is not generally useful after a break or return.

Signed-off-by: Nizam Haider 
---
 drivers/staging/rts5208/xd.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rts5208/xd.c b/drivers/staging/rts5208/xd.c
index 8fd108e..10fea7b 100644
--- a/drivers/staging/rts5208/xd.c
+++ b/drivers/staging/rts5208/xd.c
@@ -1379,9 +1379,8 @@ static int xd_erase_block(struct rtsx_chip *chip, u32 
phy_blk)
xd_set_err_code(chip, XD_PRG_ERROR);
rtsx_trace(chip);
return STATUS_FAIL;
-   } else {
-   xd_set_err_code(chip, XD_ERASE_FAIL);
}
+   xd_set_err_code(chip, XD_ERASE_FAIL);
retval = xd_reset_cmd(chip);
if (retval != STATUS_SUCCESS) {
rtsx_trace(chip);
-- 
1.7.7

--
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/


[PATCH] USB: core: buffer: fixed the checkpatch warning

2015-05-04 Thread Nizam Haider
Fixed two warnings sizeof name and Blank line after declaration

Signed-off-by: Nizam Haider 
---
 drivers/usb/core/buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index 684ef70..04125b6 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -62,7 +62,7 @@ int hcd_buffer_create(struct usb_hcd *hcd)
size = pool_max[i];
if (!size)
continue;
-   snprintf(name, sizeof name, "buffer-%d", size);
+   snprintf(name, sizeof(name), "buffer-%d", size);
hcd->pool[i] = dma_pool_create(name, hcd->self.controller,
size, size, 0);
if (!hcd->pool[i]) {
@@ -87,6 +87,7 @@ void hcd_buffer_destroy(struct usb_hcd *hcd)
 
for (i = 0; i < HCD_BUFFER_POOLS; i++) {
struct dma_pool *pool = hcd->pool[i];
+
if (pool) {
dma_pool_destroy(pool);
hcd->pool[i] = NULL;
-- 
1.8.1.4

--
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/


[PATCH 3/3] Usb: core: buffer: fixed the checkpatch warning

2015-04-29 Thread Nizam Haider
Fixed two warnings sizeof name and Blank line after declaration

Signed-off-by: Nizam Haider 
---
 drivers/usb/core/buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index 684ef70..04125b6 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -62,7 +62,7 @@ int hcd_buffer_create(struct usb_hcd *hcd)
size = pool_max[i];
if (!size)
continue;
-   snprintf(name, sizeof name, "buffer-%d", size);
+   snprintf(name, sizeof(name), "buffer-%d", size);
hcd->pool[i] = dma_pool_create(name, hcd->self.controller,
size, size, 0);
if (!hcd->pool[i]) {
@@ -87,6 +87,7 @@ void hcd_buffer_destroy(struct usb_hcd *hcd)
 
for (i = 0; i < HCD_BUFFER_POOLS; i++) {
struct dma_pool *pool = hcd->pool[i];
+
if (pool) {
dma_pool_destroy(pool);
hcd->pool[i] = NULL;
-- 
1.8.1.4

--
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/


[PATCH 3/3] Usb: core: buffer: fixed the checkpatch warning

2015-04-28 Thread Nizam Haider
Fixed two warnings sizeof name and Blank line after declaration

Signed-off-by: Nizam Haider 
---
 drivers/usb/core/buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index 684ef70..04125b6 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -62,7 +62,7 @@ int hcd_buffer_create(struct usb_hcd *hcd)
size = pool_max[i];
if (!size)
continue;
-   snprintf(name, sizeof name, "buffer-%d", size);
+   snprintf(name, sizeof(name), "buffer-%d", size);
hcd->pool[i] = dma_pool_create(name, hcd->self.controller,
size, size, 0);
if (!hcd->pool[i]) {
@@ -87,6 +87,7 @@ void hcd_buffer_destroy(struct usb_hcd *hcd)
 
for (i = 0; i < HCD_BUFFER_POOLS; i++) {
struct dma_pool *pool = hcd->pool[i];
+
if (pool) {
dma_pool_destroy(pool);
hcd->pool[i] = NULL;
-- 
1.8.1.4

--
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/


[PATCH 3/3] Usb: core: buffer: fixed the checkpatch warning

2015-04-18 Thread Nizam Haider
Fixed two warnings sizeof name and clank line after declaration

Signed-off-by: Nizam Haider 
---
 drivers/usb/core/buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index 684ef70..04125b6 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -62,7 +62,7 @@ int hcd_buffer_create(struct usb_hcd *hcd)
size = pool_max[i];
if (!size)
continue;
-   snprintf(name, sizeof name, "buffer-%d", size);
+   snprintf(name, sizeof(name), "buffer-%d", size);
hcd->pool[i] = dma_pool_create(name, hcd->self.controller,
size, size, 0);
if (!hcd->pool[i]) {
@@ -87,6 +87,7 @@ void hcd_buffer_destroy(struct usb_hcd *hcd)
 
for (i = 0; i < HCD_BUFFER_POOLS; i++) {
struct dma_pool *pool = hcd->pool[i];
+
if (pool) {
dma_pool_destroy(pool);
hcd->pool[i] = NULL;
-- 
1.8.1.4

--
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/


0002-Spi-spi-gpio-fixed-spaces-coding-style-issue.patch

2015-01-03 Thread Nizam Haider

>From 00454f12a304489125bbdfbc2f50de3c2b9d49d3 Mon Sep 17 00:00:00 2001
From: Nizam Haider 
Date: Sun, 4 Jan 2015 00:24:38 +0530
Subject: [PATCH 2/2] Spi: spi-gpio: fixed spaces coding style issue

Fixed a coding style issue.

Signed-off-by: Nizam Haider 
---
 drivers/spi/spi-gpio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c
index aee4e75..702b0b8 100644
--- a/drivers/spi/spi-gpio.c
+++ b/drivers/spi/spi-gpio.c
@@ -92,7 +92,7 @@ struct spi_gpio {
 
 /*--*/
 
-static inline struct spi_gpio * __pure
+static inline struct spi_gpio *__pure
 spi_to_spi_gpio(const struct spi_device *spi)
 {
 	const struct spi_bitbang	*bang;
@@ -103,7 +103,7 @@ spi_to_spi_gpio(const struct spi_device *spi)
 	return spi_gpio;
 }
 
-static inline struct spi_gpio_platform_data * __pure
+static inline struct spi_gpio_platform_data *__pure
 spi_to_pdata(const struct spi_device *spi)
 {
 	return &spi_to_spi_gpio(spi)->pdata;
-- 
1.8.1.4