Re: [PATCH 2/3] Staging rtl8192e: Fixing checkpatch error in rtllib_debug.h

2014-01-06 Thread Dan Carpenter
On Sun, Jan 05, 2014 at 01:25:36PM +0100, Andreas Frembs wrote:
> In rtllib_debug.h we fixed the following checkpatch error:
>   ERROR: Macros with complex values should be enclosed in parenthesis
> 
> We fixed this with a do {} while (0), because otherwise the compiler 
> complained.
> 
> Signed-off-by: Andreas Frembs 
> Signed-off-by: Matthias Schoepe 

It would be better to replace these with WARN_ON().  I haven't looked
but I also suspect that some of these asserts might be bogus and should
be removed.

regards,
dan carpenter

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


Re: [PATCH V2] Staging: rtl8187se: fix styling issues in r8180_wx.c

2014-01-06 Thread Dan Carpenter
On Mon, Jan 06, 2014 at 12:38:51AM -0500, Dan LaManna wrote:
> This is a patch to the r8180_wx.c which fixes various whitespace issues,
> brace issues, casting/declaration syntax issues, and increases
> clarity in multi-line return statement.
> 

Looks good.

Reviewed-by: Dan Carpenter 

regards,
dan carpenter

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


[PATCH] Staging: comedi: fixed style issue Fixed a coding style issue Signed-off-by: Aruna Hewapathirane

2014-01-06 Thread Aruna-Hewapathirane
---
 drivers/staging/comedi/drivers/ke_counter.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ke_counter.c 
b/drivers/staging/comedi/drivers/ke_counter.c
index 15589f6..cebf818 100644
--- a/drivers/staging/comedi/drivers/ke_counter.c
+++ b/drivers/staging/comedi/drivers/ke_counter.c
@@ -105,7 +105,7 @@ static int cnt_auto_attach(struct comedi_device *dev,
dev->read_subdev = s;
s->type = COMEDI_SUBD_COUNTER;
-   s->subdev_flags = SDF_READABLE /* | SDF_COMMON */ ;
+   s->subdev_flags = SDF_READABLE /* | SDF_COMMON */;
s->n_chan = 3;
s->maxdata = 0x00ff;
s->insn_read = cnt_rinsn;
@@ -120,7 +120,7 @@ static int cnt_auto_attach(struct comedi_device *dev,
outb(0, dev->iobase + 0x40);
dev_info(dev->class_dev, "%s: %s attached\n",
-   dev->driver->driver_name, dev->board_name);
+   dev->driver->driver_name, dev->board_name);
return 0;
 }
--
1.7.0.4

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


Re: [PATCH] Staging: comedi: fixed style issue Fixed a coding style issue Signed-off-by: Aruna Hewapathirane

2014-01-06 Thread Dan Carpenter

Changelog mangled.  You need a blank after the subject.

On Mon, Jan 06, 2014 at 04:00:39AM -0500, Aruna-Hewapathirane wrote:
> ---
>  drivers/staging/comedi/drivers/ke_counter.c |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/ke_counter.c 
> b/drivers/staging/comedi/drivers/ke_counter.c
> index 15589f6..cebf818 100644
> --- a/drivers/staging/comedi/drivers/ke_counter.c
> +++ b/drivers/staging/comedi/drivers/ke_counter.c
> @@ -105,7 +105,7 @@ static int cnt_auto_attach(struct comedi_device *dev,
>   dev->read_subdev = s;
>   s->type = COMEDI_SUBD_COUNTER;
> - s->subdev_flags = SDF_READABLE /* | SDF_COMMON */ ;
> + s->subdev_flags = SDF_READABLE /* | SDF_COMMON */;
>   s->n_chan = 3;
>   s->maxdata = 0x00ff;
>   s->insn_read = cnt_rinsn;
> @@ -120,7 +120,7 @@ static int cnt_auto_attach(struct comedi_device *dev,
>   outb(0, dev->iobase + 0x40);
>   dev_info(dev->class_dev, "%s: %s attached\n",
> - dev->driver->driver_name, dev->board_name);
> + dev->driver->driver_name, dev->board_name);

Nope.  The original was better.

regards,
dan carpenter

>   return 0;
>  }
> --
> 1.7.0.4
> 
> ___
> devel mailing list
> de...@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: comedi: fixed style issue Fixed a coding style issue Signed-off-by: Aruna Hewapathirane

2014-01-06 Thread Aruna Hewapathirane
my apologies, it's my very first patch :-)

On Mon, Jan 6, 2014 at 4:09 AM, Dan Carpenter  wrote:
>
> Changelog mangled.  You need a blank after the subject.
>
> On Mon, Jan 06, 2014 at 04:00:39AM -0500, Aruna-Hewapathirane wrote:
>> ---
>>  drivers/staging/comedi/drivers/ke_counter.c |4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/ke_counter.c 
>> b/drivers/staging/comedi/drivers/ke_counter.c
>> index 15589f6..cebf818 100644
>> --- a/drivers/staging/comedi/drivers/ke_counter.c
>> +++ b/drivers/staging/comedi/drivers/ke_counter.c
>> @@ -105,7 +105,7 @@ static int cnt_auto_attach(struct comedi_device *dev,
>>   dev->read_subdev = s;
>>   s->type = COMEDI_SUBD_COUNTER;
>> - s->subdev_flags = SDF_READABLE /* | SDF_COMMON */ ;
>> + s->subdev_flags = SDF_READABLE /* | SDF_COMMON */;
>>   s->n_chan = 3;
>>   s->maxdata = 0x00ff;
>>   s->insn_read = cnt_rinsn;
>> @@ -120,7 +120,7 @@ static int cnt_auto_attach(struct comedi_device *dev,
>>   outb(0, dev->iobase + 0x40);
>>   dev_info(dev->class_dev, "%s: %s attached\n",
>> - dev->driver->driver_name, dev->board_name);
>> + dev->driver->driver_name, dev->board_name);
>
> Nope.  The original was better.
>
> regards,
> dan carpenter
>
>>   return 0;
>>  }
>> --
>> 1.7.0.4
>>
>> ___
>> devel mailing list
>> de...@linuxdriverproject.org
>> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



-- 
Aruna Hewapathirane
Consultant/Trainer
Phone : 647-709-9269
Website: Open Source Solutions
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: comedi: fixed style issue Fixed a coding style issue Signed-off-by: Aruna Hewapathirane

2014-01-06 Thread Dan Carpenter
On Mon, Jan 06, 2014 at 04:18:05AM -0500, Aruna Hewapathirane wrote:
> my apologies, it's my very first patch :-)
> 

No worries.  Take your time.  We were all newbies once.

regards,
dan carpenter

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


Re: [PATCH] Staging: comedi: fixed style issue Fixed a coding style issue Signed-off-by: Aruna Hewapathirane

2014-01-06 Thread Aruna Hewapathirane
To be honest I almost fell off the chair when your email pooped up in
my in-box, that has to be the fastest anyone has ever responded and it
is yet very much a learning process for me, have so much to learn.I am
humbled and thankful you have not forgotten what it was like when you
sent in that first patch :-)



On Mon, Jan 6, 2014 at 4:23 AM, Dan Carpenter  wrote:
> On Mon, Jan 06, 2014 at 04:18:05AM -0500, Aruna Hewapathirane wrote:
>> my apologies, it's my very first patch :-)
>>
>
> No worries.  Take your time.  We were all newbies once.
>
> regards,
> dan carpenter
>



-- 
Aruna Hewapathirane
Consultant/Trainer
Phone : 647-709-9269
Website: Open Source Solutions
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/3] staging: comedi: fix auto-unconfig kernel error

2014-01-06 Thread Ian Abbott

On 2013-12-28 21:31, Bernd Porr wrote:

Merging the un-registering of both the subdevices and the
main comedi device into one function and the module which
actually associated with it. The kernel oops observed before
was because the main device was un-registered first and
then the subdevices which were then no longer valid.
This has been also tested with 'comedi_config -r' for
both autoconfigured and legacy devices.

Signed-off-by: Bernd Porr 
---
  drivers/staging/comedi/comedi_fops.c | 19 +++
  drivers/staging/comedi/drivers.c | 18 --
  2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index f3d59e2..2680b72 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -141,7 +141,26 @@ static struct comedi_device 
*comedi_clear_board_minor(unsigned minor)

  static void comedi_free_board_dev(struct comedi_device *dev)
  {
+   int i;
+   struct comedi_subdevice *s;
+
if (dev) {
+   if (dev->subdevices) {
+   for (i = 0; i < dev->n_subdevices; i++) {
+   s = &dev->subdevices[i];
+   if (s->runflags & SRF_FREE_SPRIV)
+   kfree(s->private);
+   comedi_free_subdevice_minor(s);
+   if (s->async) {
+   comedi_buf_alloc(dev, s, 0);
+   kfree(s->async);
+   }
+   }
+   kfree(dev->subdevices);
+   dev->subdevices = NULL;
+   dev->n_subdevices = 0;
+   }
+
if (dev->class_dev) {
device_destroy(comedi_class,
   MKDEV(COMEDI_MAJOR, dev->minor));
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 4964d2a..d6dc58a 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -97,24 +97,6 @@ EXPORT_SYMBOL_GPL(comedi_alloc_subdevices);

  static void cleanup_device(struct comedi_device *dev)
  {
-   int i;
-   struct comedi_subdevice *s;
-
-   if (dev->subdevices) {
-   for (i = 0; i < dev->n_subdevices; i++) {
-   s = &dev->subdevices[i];
-   if (s->runflags & SRF_FREE_SPRIV)
-   kfree(s->private);
-   comedi_free_subdevice_minor(s);
-   if (s->async) {
-   comedi_buf_alloc(dev, s, 0);
-   kfree(s->async);
-   }
-   }
-   kfree(dev->subdevices);
-   dev->subdevices = NULL;
-   dev->n_subdevices = 0;
-   }
kfree(dev->private);
dev->private = NULL;
dev->driver = NULL;



This doesn't apply to linux-next any more.  (For example, 
cleanup_device() function was renamed amongst other stuff.)  I've also 
fixed a load of stuff related to this bug since this patch was 
applicable, so possibly the bug has been squashed already.


Bernd, can you reproduce the problem on the latest tagged linux-next branch?

Also, the removal of all that code from cleanup_device() (since renamed 
to comedi_device_detach_cleanup()) would stop the COMEDI_DEVCONFIG ioctl 
with NULL argument (e.g. via the 'comedi_config -r' command to detach a 
device) cleaning up after the detachment, especially for the 
preallocated "legacy" comedi devices that hang around after the 
detachment, ready to be reattached via another instance of the ioctl call.


--
-=( 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 2/3] staging: comedi: report success/failure of autoconfig

2014-01-06 Thread Ian Abbott

On 2013-12-28 21:32, Bernd Porr wrote:

Added success message to the driver autoconfig and error
message in case it fails. A success message is required
so that the user can find out which comedi driver has been
associated with which udev device. This also makes troubleshooting
much easier when more than one card is in the computer or a
mix of USB and PCI devices.
As Ian suggested we should report both the driver and the board
which might have different names, esp if one driver covers a
range of different boards.

Signed-off-by: Bernd Porr 
---
  drivers/staging/comedi/drivers.c | 19 +--
  1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index d6dc58a..59a8909 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -580,8 +580,12 @@ int comedi_auto_config(struct device *hardware_device,
}

dev = comedi_alloc_board_minor(hardware_device);
-   if (IS_ERR(dev))
+   if (IS_ERR(dev)) {
+   dev_warn(hardware_device,
+"driver '%s' could not create device.\n",
+driver->driver_name);
return PTR_ERR(dev);
+   }
/* Note: comedi_alloc_board_minor() locked dev->mutex. */

dev->driver = driver;
@@ -593,8 +597,19 @@ int comedi_auto_config(struct device *hardware_device,
comedi_device_detach(dev);
mutex_unlock(&dev->mutex);

-   if (ret < 0)
+   if (ret < 0) {
+   dev_warn(hardware_device,
+"driver '%s' faild to auto-configure device.\n",


A typo here: 'faild' should be 'failed'.


+driver->driver_name);
comedi_release_hardware_device(hardware_device);
+   } else {
+   /* class_dev should be set properly here
+  after a successful auto config */


The preferred style for multi-line comments is:

/*
 * blah blah
 * blah blah
 */


+   dev_info(dev->class_dev,
+"driver '%s' has successfully "
+"auto-configured '%s'.\n",
+driver->driver_name, dev->board_name);
+   }


I know the checkpatch.pl script used to complain about concatenated 
string literals, preferring a single string literal even if the code 
went over 80 columns as a result.  It doesn't seem to complain here, but 
I think it's still recommended practice.  (Could someone clarify the 
recommended practice here?)



return ret;
  }
  EXPORT_SYMBOL_GPL(comedi_auto_config);




--
-=( 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 3/3] staging: comedi: drivers: streamlined auto attach with main comedi

2014-01-06 Thread Ian Abbott
It would be better to put "usbduxsigma:" in the patch title instead of 
"drivers:" since it's only for a single driver.


On 2013-12-28 21:32, Bernd Porr wrote:

Removed the word "attached" from the "ADC_zero" output which is
now reported by comedi itself at the end of the auto attach.
A negative value of the offset is an error and should be reported to
comedi auto config as an error. Output only the offset if no error
has been reported.

Signed-off-by: Bernd Porr 
---
  drivers/staging/comedi/drivers/usbduxsigma.c | 9 ++---
  1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c 
b/drivers/staging/comedi/drivers/usbduxsigma.c
index a5363de..125eae5 100644
--- a/drivers/staging/comedi/drivers/usbduxsigma.c
+++ b/drivers/staging/comedi/drivers/usbduxsigma.c
@@ -1656,11 +1656,14 @@ static int usbduxsigma_auto_attach(struct comedi_device 
*dev,
}

offset = usbduxsigma_getstatusinfo(dev, 0);
-   if (offset < 0)
+   if (offset < 0) {
+   /* a neg ADC value in comedi terms is a device error */
dev_err(dev->class_dev,
-   "Communication to USBDUXSIGMA failed! Check firmware and 
cabling\n");
+   "Communication to USBDUXSIGMA failed! Check firmware and 
cabling.\n");
+   return offset;
+   }

-   dev_info(dev->class_dev, "attached, ADC_zero = %x\n", offset);
+   dev_info(dev->class_dev, "ADC_zero = %x\n", offset);

return 0;
  }



Ideally, it would be two patches, one to return the error and the other 
to correct the messages, but doesn't matter too much.


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 2/3] staging: comedi: report success/failure of autoconfig

2014-01-06 Thread Dan Carpenter
On Mon, Jan 06, 2014 at 11:56:22AM +, Ian Abbott wrote:
> 
> I know the checkpatch.pl script used to complain about concatenated
> string literals, preferring a single string literal even if the code
> went over 80 columns as a result.  It doesn't seem to complain here,
> but I think it's still recommended practice.  (Could someone clarify
> the recommended practice here?)
> 

Better to put everything as a string literal so we can grep for it.

I think that is still the fashion.  :)

regards,
dan carpenter


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


Re: [PATCH] comedi: Humusoft MF634 and MF624 DAQ cards driver

2014-01-06 Thread Ian Abbott

On 2014-01-02 18:38, Hartley Sweeten wrote:

On Monday, December 30, 2013 6:37 PM, Rostislav Lisovy wrote:

[snip]

+static int mf6x4_dio_insn_bits(struct comedi_device *dev,
+struct comedi_subdevice *s,
+struct comedi_insn *insn, unsigned int *data)
+{
+ struct mf6x4_private *devpriv = dev->private;
+
+ switch (s->type) {
+ case COMEDI_SUBD_DI: /* DIN */
+ data[1] = ioread16(devpriv->bar1_mem + MF6X4_DIN_reg) & 
MF6X4_DIN_mask;
+ break;
+
+ case COMEDI_SUBD_DO: /* DOUT */
+ /* data[0] -- mask
+data[1] -- actual value */
+ if (data[0]) {
+ s->state &= ~data[0];
+ s->state |= (data[0] & data[1]);


Please use comedi_dio_update_state() to handle this boilerplate code.


+
+ iowrite16(s->state & MF6X4_DOUT_mask,
+ devpriv->bar1_mem + MF6X4_DOUT_reg);
+
+ data[1] = s->state;
+ }
+ break;
+ }
+
+ return insn->n;
+}


Please split this function into a mf6x4_di_insn_bits() and mf6x4_do_insn_bits().
That will remove an indent level and make the usage a bit clearer.


I'll also add that the `data[1] = s->state;` should be done even if 
data[0] is zero, i.e. it should be moved after the end of the `if` 
statement.


--
-=( 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 1/3] staging: comedi: fix auto-unconfig kernel error

2014-01-06 Thread Ian Abbott

On 2014-01-06 13:01, Bernd Porr wrote:

Hi Ian,

will test later and fix the patches / rebase them to the latest version.

For future patches: shall I in general submit my patches against the
latest linux next or against linux next + Greg's remote staging tree?
I'm a bit confused because I thought linux next plus Gregs remote would
be the most cutting edge version? Should I just patch against linux-next?

/Bernd


For comedi stuff, I base patches on the "staging-next" branch of Greg's 
staging tree.


--
-=( 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 1/3] staging: comedi: fix auto-unconfig kernel error

2014-01-06 Thread Bernd Porr

Hi Ian,

will test later and fix the patches / rebase them to the latest version.

For future patches: shall I in general submit my patches against the 
latest linux next or against linux next + Greg's remote staging tree? 
I'm a bit confused because I thought linux next plus Gregs remote would 
be the most cutting edge version? Should I just patch against linux-next?


/Bernd

Ian Abbott wrote:

On 2013-12-28 21:31, Bernd Porr wrote:

Merging the un-registering of both the subdevices and the
main comedi device into one function and the module which
actually associated with it. The kernel oops observed before
was because the main device was un-registered first and
then the subdevices which were then no longer valid.
This has been also tested with 'comedi_config -r' for
both autoconfigured and legacy devices.

Signed-off-by: Bernd Porr 
---
  drivers/staging/comedi/comedi_fops.c | 19 +++
  drivers/staging/comedi/drivers.c | 18 --
  2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c

index f3d59e2..2680b72 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -141,7 +141,26 @@ static struct comedi_device 
*comedi_clear_board_minor(unsigned minor)


  static void comedi_free_board_dev(struct comedi_device *dev)
  {
+int i;
+struct comedi_subdevice *s;
+
  if (dev) {
+if (dev->subdevices) {
+for (i = 0; i < dev->n_subdevices; i++) {
+s = &dev->subdevices[i];
+if (s->runflags & SRF_FREE_SPRIV)
+kfree(s->private);
+comedi_free_subdevice_minor(s);
+if (s->async) {
+comedi_buf_alloc(dev, s, 0);
+kfree(s->async);
+}
+}
+kfree(dev->subdevices);
+dev->subdevices = NULL;
+dev->n_subdevices = 0;
+}
+
  if (dev->class_dev) {
  device_destroy(comedi_class,
 MKDEV(COMEDI_MAJOR, dev->minor));
diff --git a/drivers/staging/comedi/drivers.c 
b/drivers/staging/comedi/drivers.c

index 4964d2a..d6dc58a 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -97,24 +97,6 @@ EXPORT_SYMBOL_GPL(comedi_alloc_subdevices);

  static void cleanup_device(struct comedi_device *dev)
  {
-int i;
-struct comedi_subdevice *s;
-
-if (dev->subdevices) {
-for (i = 0; i < dev->n_subdevices; i++) {
-s = &dev->subdevices[i];
-if (s->runflags & SRF_FREE_SPRIV)
-kfree(s->private);
-comedi_free_subdevice_minor(s);
-if (s->async) {
-comedi_buf_alloc(dev, s, 0);
-kfree(s->async);
-}
-}
-kfree(dev->subdevices);
-dev->subdevices = NULL;
-dev->n_subdevices = 0;
-}
  kfree(dev->private);
  dev->private = NULL;
  dev->driver = NULL;



This doesn't apply to linux-next any more.  (For example, 
cleanup_device() function was renamed amongst other stuff.)  I've also 
fixed a load of stuff related to this bug since this patch was 
applicable, so possibly the bug has been squashed already.


Bernd, can you reproduce the problem on the latest tagged linux-next 
branch?


Also, the removal of all that code from cleanup_device() (since renamed 
to comedi_device_detach_cleanup()) would stop the COMEDI_DEVCONFIG ioctl 
with NULL argument (e.g. via the 'comedi_config -r' command to detach a 
device) cleaning up after the detachment, especially for the 
preallocated "legacy" comedi devices that hang around after the 
detachment, ready to be reattached via another instance of the ioctl call.




--
http://www.berndporr.me.uk
http://www.linux-usb-daq.co.uk
http://www.imdb.com/name/nm3293421/
+44 (0)7840 340069
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rts5139: Fixed style issues

2014-01-06 Thread Morgan Creekmore
Fixed style issues for lines over 80 chars

Signed-off-by: Morgan Creekmore 
---
 drivers/staging/rts5139/rts51x_card.c | 10 +-
 drivers/staging/rts5139/rts51x_card.h |  8 
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rts5139/rts51x_card.c 
b/drivers/staging/rts5139/rts51x_card.c
index 509d83e..03456d9 100644
--- a/drivers/staging/rts5139/rts51x_card.c
+++ b/drivers/staging/rts5139/rts51x_card.c
@@ -373,7 +373,7 @@ void rts51x_release_cards(struct rts51x_chip *chip)
 
 static inline u8 double_depth(u8 depth)
 {
-   return ((depth > 1) ? (depth - 1) : depth);
+   return (depth > 1) ? (depth - 1) : depth;
 }
 
 int rts51x_switch_ssc_clock(struct rts51x_chip *chip, int clk)
@@ -653,8 +653,8 @@ int rts51x_switch_normal_clock(struct rts51x_chip *chip, 
int clk)
return STATUS_SUCCESS;
 }
 
-int rts51x_card_rw(struct scsi_cmnd *srb, struct rts51x_chip *chip, u32 
sec_addr,
-   u16 sec_cnt)
+int rts51x_card_rw(struct scsi_cmnd *srb, struct rts51x_chip *chip,
+   u32 sec_addr, u16 sec_cnt)
 {
int retval;
unsigned int lun = SCSI_LUN(srb);
@@ -770,8 +770,8 @@ void rts51x_eject_card(struct rts51x_chip *chip, unsigned 
int lun)
  XD_INT | MS_INT | SD_INT);
 }
 
-void rts51x_trans_dma_enable(enum dma_data_direction dir, struct rts51x_chip 
*chip,
- u32 byte_cnt, u8 pack_size)
+void rts51x_trans_dma_enable(enum dma_data_direction dir,
+   struct rts51x_chip *chip, u32 byte_cnt, u8 pack_size)
 {
if (pack_size > DMA_1024)
pack_size = DMA_512;
diff --git a/drivers/staging/rts5139/rts51x_card.h 
b/drivers/staging/rts5139/rts51x_card.h
index e62b25c..df8816e 100644
--- a/drivers/staging/rts5139/rts51x_card.h
+++ b/drivers/staging/rts5139/rts51x_card.h
@@ -743,13 +743,13 @@ void rts51x_init_cards(struct rts51x_chip *chip);
 void rts51x_release_cards(struct rts51x_chip *chip);
 int rts51x_switch_ssc_clock(struct rts51x_chip *chip, int clk);
 int rts51x_switch_normal_clock(struct rts51x_chip *chip, int clk);
-int rts51x_card_rw(struct scsi_cmnd *srb, struct rts51x_chip *chip, u32 
sec_addr,
-   u16 sec_cnt);
+int rts51x_card_rw(struct scsi_cmnd *srb, struct rts51x_chip *chip,
+   u32 sec_addr, u16 sec_cnt);
 u8 rts51x_get_lun_card(struct rts51x_chip *chip, unsigned int lun);
 int rts51x_select_card(struct rts51x_chip *chip, int card);
 void rts51x_eject_card(struct rts51x_chip *chip, unsigned int lun);
-void rts51x_trans_dma_enable(enum dma_data_direction dir, struct rts51x_chip 
*chip,
- u32 byte_cnt, u8 pack_size);
+void rts51x_trans_dma_enable(enum dma_data_direction dir,
+   struct rts51x_chip *chip, u32 byte_cnt, u8 pack_size);
 int rts51x_enable_card_clock(struct rts51x_chip *chip, u8 card);
 int rts51x_card_power_on(struct rts51x_chip *chip, u8 card);
 int rts51x_toggle_gpio(struct rts51x_chip *chip, u8 gpio);
-- 
1.8.3.2

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


[RFC PATCH 0/3] imx-drm dt bindings

2014-01-06 Thread Philipp Zabel
Hi,

these patches apply on top of Russell's imx-drm cleanup preview
series. I have added device tree bindings between IPU and the
encoders as documented in
Documentation/devicetree/bindings/media/video-interfaces.txt
and used those to determine the possible_crtcs and mux_id.

The crtc cookie is replaced with a the port device tree node,
which is unique and therefore allows to get rid of the di_id
comparison. Storing the multiplexer input numbers in the device
tree removes the need to know the ipu_id. This should also allow
to replace IPU2 with LCDIF on i.MX6 Solo more easily.

regards
Philipp

Philipp Zabel (3):
  ARM: dts: imx6qdl: Add ports and endpoints to IPU DIs
  staging: imx-drm-core: Use graph to find connection between crtc and
encoder
  staging: imx-drm-core: associate crtc devices with di port nodes

 arch/arm/boot/dts/imx6q.dtsi   | 115 +++--
 arch/arm/boot/dts/imx6qdl.dtsi | 127 -
 drivers/staging/imx-drm/imx-drm-core.c |  82 ++---
 drivers/staging/imx-drm/imx-drm.h  |   4 +-
 drivers/staging/imx-drm/imx-hdmi.c |   2 +-
 drivers/staging/imx-drm/imx-ldb.c  |   4 +-
 drivers/staging/imx-drm/ipuv3-crtc.c   |  36 +-
 7 files changed, 328 insertions(+), 42 deletions(-)

-- 
1.8.5.2

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


[RFC PATCH 1/3] ARM: dts: imx6qdl: Add ports and endpoints to IPU DIs

2014-01-06 Thread Philipp Zabel
This connects the IPU and display encoder (HDMI, LVDS, MIPI)
device tree nodes using the bindings described in
Documentation/devicetree/bindings/media/video-interfaces.txt

The IPU ports correspond to the two display interfaces. Port
numbering begins at 2 to leave space for the two CSI input
ports. The order of endpoints in the ports is arbitrary.

Each encoder with an associated input multiplexer has multiple
input ports in the device tree. The order and reg property of
the ports must correspond to the multiplexer input order.

Signed-off-by: Philipp Zabel 
---
 arch/arm/boot/dts/imx6q.dtsi   | 115 +++--
 arch/arm/boot/dts/imx6qdl.dtsi | 127 -
 2 files changed, 234 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index 187fe33..f36f739 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -132,13 +132,75 @@
};
 
ipu2: ipu@0280 {
-   #crtc-cells = <1>;
+   #address-cells = <1>;
+   #size-cells = <0>;
compatible = "fsl,imx6q-ipu";
reg = <0x0280 0x40>;
interrupts = <0 8 0x4 0 7 0x4>;
clocks = <&clks 133>, <&clks 134>, <&clks 137>;
clock-names = "bus", "di0", "di1";
resets = <&src 4>;
+
+   port@2 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <2>;
+
+   ipu2_di0_disp0: endpoint@0 {
+   };
+
+   ipu2_di0_hdmi: endpoint@1 {
+   remote-endpoint = <&hdmi_mux_2>;
+   };
+
+   ipu2_di0_mipi: endpoint@2 {
+   };
+
+   ipu2_di0_lvds0: endpoint@3 {
+   };
+
+   ipu2_di0_lvds1: endpoint@4 {
+   };
+   };
+
+   port@3 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <3>;
+
+   ipu2_di1_hdmi: endpoint@1 {
+   remote-endpoint = <&hdmi_mux_3>;
+   };
+
+   ipu2_di1_mipi: endpoint@2 {
+   };
+
+   ipu2_di1_lvds0: endpoint@3 {
+   };
+
+   ipu2_di1_lvds1: endpoint@4 {
+   };
+   };
+   };
+   };
+};
+
+&hdmi {
+   compatible = "fsl,imx6q-hdmi";
+
+   port@2 {
+   reg = <2>;
+
+   hdmi_mux_2: endpoint {
+   remote-endpoint = <&ipu2_di0_hdmi>;
+   };
+   };
+
+   port@3 {
+   reg = <3>;
+
+   hdmi_mux_3: endpoint {
+   remote-endpoint = <&ipu2_di1_hdmi>;
};
};
 };
@@ -152,15 +214,56 @@
  "di0", "di1";
 
lvds-channel@0 {
-   crtcs = <&ipu1 0>, <&ipu1 1>, <&ipu2 0>, <&ipu2 1>;
+   port@2 {
+   reg = <2>;
+
+   lvds0_mux_2: endpoint {
+   remote-endpoint = <&ipu2_di0_lvds0>;
+   };
+   };
+
+   port@3 {
+   reg = <3>;
+
+   lvds0_mux_3: endpoint {
+   remote-endpoint = <&ipu2_di1_lvds0>;
+   };
+   };
};
 
lvds-channel@1 {
-   crtcs = <&ipu1 0>, <&ipu1 1>, <&ipu2 0>, <&ipu2 1>;
+   port@2 {
+   reg = <2>;
+
+   lvds1_mux_2: endpoint {
+   remote-endpoint = <&ipu2_di0_lvds1>;
+   };
+   };
+
+   port@3 {
+   reg = <3>;
+
+   lvds1_mux_3: endpoint {
+   remote-endpoint = <&ipu2_di1_lvds1>;
+   };
+   };
};
 };
 
-&hdmi {
-   compatible = "fsl,imx6q-hdmi";
-   crtcs = <&ipu1 0>, <&ipu1 1>, <&ipu2 0>, <&ipu2 1>;
+&mipi_dsi {
+   port@2 {
+   reg = <2>;
+
+   mipi_mux_2: endpoint {
+   remote-endpoint = <&ipu2_di0_mipi>;
+   };
+   };
+
+   port@3 {
+   reg = <3>;
+
+   mipi_mux_3: endpoint {
+   remote-endpoint = <&ipu2_d

[RFC PATCH 2/3] staging: imx-drm-core: Use graph to find connection between crtc and encoder

2014-01-06 Thread Philipp Zabel
Signed-off-by: Philipp Zabel 
---
 drivers/staging/imx-drm/imx-drm-core.c | 44 --
 1 file changed, 32 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-drm-core.c 
b/drivers/staging/imx-drm/imx-drm-core.c
index 2490dc3..2c20434 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "imx-drm.h"
 
@@ -420,9 +421,23 @@ EXPORT_SYMBOL_GPL(imx_drm_remove_crtc);
  * or removed once the DRM device has been fully initialised.
  */
 static uint32_t imx_drm_find_crtc_mask(struct imx_drm_device *imxdrm,
-   void *cookie, int id)
+   struct device_node *endpoint)
 {
+   struct device_node *remote_port;
+   void *cookie;
unsigned i;
+   int id = 0;
+
+   remote_port = v4l2_of_get_remote_port(endpoint);
+   if (remote_port)
+   of_property_read_u32(remote_port, "reg", &id);
+   else
+   return 0;
+   cookie = remote_port->parent;
+   of_node_put(remote_port);
+
+   /* IPU specific: CSI0/1 at 0/1, DI0/1 at 2/3 */
+   id -= 2;
 
for (i = 0; i < MAX_CRTC; i++) {
struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[i];
@@ -438,24 +453,21 @@ int imx_drm_encoder_parse_of(struct drm_device *drm,
struct drm_encoder *encoder, struct device_node *np)
 {
struct imx_drm_device *imxdrm = drm->dev_private;
+   struct device_node *ep, *last_ep = NULL;
uint32_t crtc_mask = 0;
int i, ret = 0;
 
for (i = 0; !ret; i++) {
-   struct of_phandle_args args;
uint32_t mask;
-   int id;
 
-   ret = of_parse_phandle_with_args(np, "crtcs", "#crtc-cells", i,
-&args);
-   if (ret == -ENOENT)
+   ep = v4l2_of_get_next_endpoint(np, last_ep);
+   if (last_ep)
+   of_node_put(last_ep);
+   if (!ep)
break;
-   if (ret < 0)
-   return ret;
 
-   id = args.args_count > 0 ? args.args[0] : 0;
-   mask = imx_drm_find_crtc_mask(imxdrm, args.np, id);
-   of_node_put(args.np);
+   /* CSI */
+   mask = imx_drm_find_crtc_mask(imxdrm, ep);
 
/*
 * If we failed to find the CRTC(s) which this encoder is
@@ -463,12 +475,20 @@ int imx_drm_encoder_parse_of(struct drm_device *drm,
 * not been registered yet.  Defer probing, and hope that
 * the required CRTC is added later.
 */
-   if (mask == 0)
+   if (mask == 0) {
+   of_node_put(ep);
return -EPROBE_DEFER;
+   }
 
crtc_mask |= mask;
+   last_ep = ep;
}
 
+   if (ep)
+   of_node_put(ep);
+   if (i == 0)
+   return -ENOENT;
+
encoder->possible_crtcs = crtc_mask;
 
/* FIXME: this is the mask of outputs which can clone this output. */
-- 
1.8.5.2

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


[RFC PATCH 3/3] staging: imx-drm-core: associate crtc devices with di port nodes

2014-01-06 Thread Philipp Zabel
To connect the graph in the device tree, each display interface
needs to have an associated port node in the device tree. We can
associate this node with the crtc device and use it to find the
crtc corresponding to a given node instead of using a combination
of parent device node and id.
Explicitly converting the void* cookie to the port device tree node
allows to get rid of the ipu_id and di_id fields. The multiplexer
setting now can be obtained from the port reg property in the
device tree.

Signed-off-by: Philipp Zabel 
---
 drivers/staging/imx-drm/imx-drm-core.c | 62 +++---
 drivers/staging/imx-drm/imx-drm.h  |  4 +--
 drivers/staging/imx-drm/imx-hdmi.c |  2 +-
 drivers/staging/imx-drm/imx-ldb.c  |  4 +--
 drivers/staging/imx-drm/ipuv3-crtc.c   | 36 ++--
 5 files changed, 74 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-drm-core.c 
b/drivers/staging/imx-drm/imx-drm-core.c
index 2c20434..da34b2d 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -42,9 +42,7 @@ struct imx_drm_crtc {
struct drm_crtc *crtc;
int pipe;
struct imx_drm_crtc_helper_funcsimx_drm_helper_funcs;
-   void*cookie;
-   int di_id;
-   int ipu_id;
+   struct device_node  *port;
 };
 
 static int legacyfb_depth = 16;
@@ -339,14 +337,11 @@ err_kms:
 
 /*
  * imx_drm_add_crtc - add a new crtc
- *
- * The return value if !NULL is a cookie for the caller to pass to
- * imx_drm_remove_crtc later.
  */
 int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
struct imx_drm_crtc **new_crtc,
const struct imx_drm_crtc_helper_funcs *imx_drm_helper_funcs,
-   void *cookie, int ipu_id, int di_id)
+   struct device_node *port)
 {
struct imx_drm_device *imxdrm = drm->dev_private;
struct imx_drm_crtc *imx_drm_crtc;
@@ -368,9 +363,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct 
drm_crtc *crtc,
 
imx_drm_crtc->imx_drm_helper_funcs = *imx_drm_helper_funcs;
imx_drm_crtc->pipe = imxdrm->pipes++;
-   imx_drm_crtc->cookie = cookie;
-   imx_drm_crtc->di_id = di_id;
-   imx_drm_crtc->ipu_id = ipu_id;
+   imx_drm_crtc->port = port;
imx_drm_crtc->crtc = crtc;
 
imxdrm->crtc[imx_drm_crtc->pipe] = imx_drm_crtc;
@@ -414,7 +407,7 @@ int imx_drm_remove_crtc(struct imx_drm_crtc *imx_drm_crtc)
 EXPORT_SYMBOL_GPL(imx_drm_remove_crtc);
 
 /*
- * Find the DRM CRTC possible mask for the device node cookie/id.
+ * Find the DRM CRTC possible mask for the connected endpoint.
  *
  * The encoder possible masks are defined by their position in the
  * mode_config crtc_list.  This means that CRTCs must not be added
@@ -423,26 +416,17 @@ EXPORT_SYMBOL_GPL(imx_drm_remove_crtc);
 static uint32_t imx_drm_find_crtc_mask(struct imx_drm_device *imxdrm,
struct device_node *endpoint)
 {
-   struct device_node *remote_port;
-   void *cookie;
+   struct device_node *port;
unsigned i;
-   int id = 0;
 
-   remote_port = v4l2_of_get_remote_port(endpoint);
-   if (remote_port)
-   of_property_read_u32(remote_port, "reg", &id);
-   else
+   port = v4l2_of_get_remote_port(endpoint);
+   if (!port)
return 0;
-   cookie = remote_port->parent;
-   of_node_put(remote_port);
-
-   /* IPU specific: CSI0/1 at 0/1, DI0/1 at 2/3 */
-   id -= 2;
+   of_node_put(port);
 
for (i = 0; i < MAX_CRTC; i++) {
struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[i];
-   if (imx_drm_crtc && imx_drm_crtc->di_id == id &&
-   imx_drm_crtc->cookie == cookie)
+   if (imx_drm_crtc && imx_drm_crtc->port == port)
return 
drm_helper_crtc_possible_mask(imx_drm_crtc->crtc);
}
 
@@ -498,11 +482,35 @@ int imx_drm_encoder_parse_of(struct drm_device *drm,
 }
 EXPORT_SYMBOL_GPL(imx_drm_encoder_parse_of);
 
-int imx_drm_encoder_get_mux_id(struct drm_encoder *encoder)
+int imx_drm_encoder_get_mux_id(struct device *dev, struct drm_encoder *encoder)
 {
struct imx_drm_crtc *imx_crtc = imx_drm_find_crtc(encoder->crtc);
+   struct device_node *parent = dev->of_node;
+   struct device_node *ep, *last_ep = NULL;
+   struct device_node *port;
+   int id, ret;
+
+   if (!parent || !imx_crtc)
+   return -EINVAL;
+
+   do {
+   ep = v4l2_of_get_next_endpoint(parent, last_ep);
+   if (last_ep)
+   of_node_put(last_ep);
+   if (!ep)
+   break;
+
+   port = v4l2_of_get_remote_port(ep);
+   if (port == imx_crtc->port

Re: [PATCH RFC 27/46] imx-drm: convert to componentised device support

2014-01-06 Thread Philipp Zabel
Hi Eric,

Am Freitag, den 03.01.2014, 12:14 -0700 schrieb Eric Nelson:
> This is an issue we've seen before. The SABRE Lite board has
> a voltage divider on the HPD pins and some monitors (esp. DVI
> monitors) either don't drive things high enough to assert HPD or
> bounce with connect/disconnect.

Yes, I used a DVI monitor.

> We've instrumented our 3.0.35 kernels to use the RX_SENSE bits
> instead.

Reacting to RX_SENSE0 instead of HPD seems to work.

thanks
Philipp

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


Re: [PATCH RFC 27/46] imx-drm: convert to componentised device support

2014-01-06 Thread Russell King - ARM Linux
On Mon, Jan 06, 2014 at 06:41:28PM +0100, Philipp Zabel wrote:
> Hi Eric,
> 
> Am Freitag, den 03.01.2014, 12:14 -0700 schrieb Eric Nelson:
> > This is an issue we've seen before. The SABRE Lite board has
> > a voltage divider on the HPD pins and some monitors (esp. DVI
> > monitors) either don't drive things high enough to assert HPD or
> > bounce with connect/disconnect.
> 
> Yes, I used a DVI monitor.
> 
> > We've instrumented our 3.0.35 kernels to use the RX_SENSE bits
> > instead.
> 
> Reacting to RX_SENSE0 instead of HPD seems to work.

However, it's non-compliant, because HPD can be lowered and raised by
the sink when it changes its EDID data (eg, because you're connected
through a switch and the routing has been changed.)

So, reacting to RX_SENSE0 instead of HPD has to be a work-around enabled
only for those boards which are broken in this regard.

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RFC 27/46] imx-drm: convert to componentised device support

2014-01-06 Thread Eric Nelson

Hi Russell,

On 01/06/2014 10:46 AM, Russell King - ARM Linux wrote:

On Mon, Jan 06, 2014 at 06:41:28PM +0100, Philipp Zabel wrote:

Hi Eric,

Am Freitag, den 03.01.2014, 12:14 -0700 schrieb Eric Nelson:

This is an issue we've seen before. The SABRE Lite board has
a voltage divider on the HPD pins and some monitors (esp. DVI
monitors) either don't drive things high enough to assert HPD or
bounce with connect/disconnect.


Yes, I used a DVI monitor.


We've instrumented our 3.0.35 kernels to use the RX_SENSE bits
instead.


Reacting to RX_SENSE0 instead of HPD seems to work.


However, it's non-compliant, because HPD can be lowered and raised by
the sink when it changes its EDID data (eg, because you're connected
through a switch and the routing has been changed.)

So, reacting to RX_SENSE0 instead of HPD has to be a work-around enabled
only for those boards which are broken in this regard.



I understand. We'll need to carry some patches for a while though,
since there are lots of these boards in the wild.

Regards,


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


[PATCH v2] Staging: comedi: drivers:

2014-01-06 Thread Aruna-Hewapathirane
Fixed a coding style issue in ke_counter.c

Signed-off-by: Aruna Hewapathirane 
---
 drivers/staging/comedi/drivers/ke_counter.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ke_counter.c 
b/drivers/staging/comedi/drivers/ke_counter.c
index 15589f6..cebf818 100644
--- a/drivers/staging/comedi/drivers/ke_counter.c
+++ b/drivers/staging/comedi/drivers/ke_counter.c
@@ -105,7 +105,7 @@ static int cnt_auto_attach(struct comedi_device *dev,
dev->read_subdev = s;
 
s->type = COMEDI_SUBD_COUNTER;
-   s->subdev_flags = SDF_READABLE /* | SDF_COMMON */ ;
+   s->subdev_flags = SDF_READABLE /* | SDF_COMMON */;
s->n_chan = 3;
s->maxdata = 0x00ff;
s->insn_read = cnt_rinsn;
@@ -120,7 +120,7 @@ static int cnt_auto_attach(struct comedi_device *dev,
outb(0, dev->iobase + 0x40);
 
dev_info(dev->class_dev, "%s: %s attached\n",
-   dev->driver->driver_name, dev->board_name);
+   dev->driver->driver_name, dev->board_name);
 
return 0;
 }
-- 
1.7.0.4

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


Re: [PATCH RFC 00/46] Preview of imx-drm cleanup series

2014-01-06 Thread Shawn Guo
On Thu, Jan 02, 2014 at 09:25:28PM +, Russell King - ARM Linux wrote:
> Here is my large patch series which cleans up imx-drm, and gets it ready
> to move out of drivers/staging.  This is a preview only.

When moving to non-RFC patches, you may want to run checkpatch.pl on the
patches.  There are some errors and warnings than just "line over 80
characters" one.

Shawn

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


Re: [PATCH RFC 24/46] imx-drm: provide common connector mode validation function

2014-01-06 Thread Shawn Guo
On Thu, Jan 02, 2014 at 09:27:48PM +, Russell King wrote:
> diff --git a/drivers/staging/imx-drm/imx-drm.h 
> b/drivers/staging/imx-drm/imx-drm.h
> index 5649f180dc44..4eb594ce9cff 100644
> --- a/drivers/staging/imx-drm/imx-drm.h
> +++ b/drivers/staging/imx-drm/imx-drm.h
> @@ -68,4 +68,7 @@ int imx_drm_encoder_get_mux_id(struct drm_encoder *encoder);
>  int imx_drm_encoder_add_possible_crtcs(struct imx_drm_encoder 
> *imx_drm_encoder,
>   struct device_node *np);
>  
> +int imx_drm_connector_mode_valid(struct drm_connector *connector,
> + struct drm_display_mode *mode);
> +
>  #endif /* _IMX_DRM_H_ */

  CC  drivers/staging/imx-drm/ipu-v3/ipu-dc.o
  LD  net/ethernet/built-in.o
In file included from drivers/staging/imx-drm/ipu-v3/ipu-dc.c:23:0:
drivers/staging/imx-drm/ipu-v3/../imx-drm.h:56:9: warning: ‘struct 
drm_display_mode’ declared inside parameter list [enabled by default]
drivers/staging/imx-drm/ipu-v3/../imx-drm.h:56:9: warning: its scope is only 
this definition or declaration, which is probably not what you want [enabled by 
default]

Shawn

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


Re: [PATCH RFC 30/46] imx-drm: remove separate imx-fbdev

2014-01-06 Thread Shawn Guo
On Thu, Jan 02, 2014 at 09:28:19PM +, Russell King wrote:
> @@ -449,6 +458,24 @@ static int imx_drm_driver_load(struct drm_device *drm, 
> unsigned long flags)
>   }
>   }
>  
> + /*
> +  * All components are now initialised, so setup the fb helper.
> +  * The fb helper takes copies of key hardware information, so the
> +  * crtcs/connectors/encoders must not change after this point.
> +  */
> +#if IS_ENABLED(CONFIG_DRM_IMX_FB_HELPER)
> + if (legacyfb_depth != 16 && legacyfb_depth != 32) {
> + dev_warn(drm->dev, "Invalid legacyfb_depth.  Defaulting to 
> 16bpp\n");
> + legacyfb_depth = 16;
> + }
> + imxdrm->fbhelper = drm_fbdev_cma_init(drm, legacyfb_depth,
> + drm->mode_config.num_crtc, 4);

s/4/MAX_CRTC

imx-drm-core.c has the macro.

Shawn

> + if (IS_ERR(imxdrm->fbhelper)) {
> + ret = PTR_ERR(imxdrm->fbhelper);
> + imxdrm->fbhelper = NULL;
> + goto err_unbind;
> + }
> +#endif
>   return 0;
>  
>  err_unbind:

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