All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: capfun: fix - mask must be type u64
@ 2011-08-18 12:01 michael.hennerich
  2011-08-19 10:26 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: michael.hennerich @ 2011-08-18 12:01 UTC (permalink / raw)
  To: jic23; +Cc: linux-iio, device-drivers-devel, drivers, Michael Hennerich

From: Michael Hennerich <michael.hennerich@analog.com>

mask must be type u64 otherwise it won't hold a full event code

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
 drivers/staging/iio/iio_core.h          |    2 +-
 drivers/staging/iio/industrialio-core.c |    9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/iio/iio_core.h b/drivers/staging/iio/iio_core.h
index 433952b..85ac5b2 100644
--- a/drivers/staging/iio/iio_core.h
+++ b/drivers/staging/iio/iio_core.h
@@ -33,7 +33,7 @@ int __iio_add_chan_devattr(const char *postfix,
 						struct device_attribute *attr,
 						const char *buf,
 						size_t len),
-			   int mask,
+			   u64 mask,
 			   bool generic,
 			   struct device *dev,
 			   struct list_head *attr_list);
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index 4aa538f..35e81f8 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -519,7 +519,7 @@ int __iio_add_chan_devattr(const char *postfix,
 						struct device_attribute *attr,
 						const char *buf,
 						size_t len),
-			   int mask,
+			   u64 mask,
 			   bool generic,
 			   struct device *dev,
 			   struct list_head *attr_list)
@@ -643,7 +643,7 @@ static int iio_device_register_sysfs(struct iio_dev *dev_info)
 	else
 		ret = sysfs_create_group(&dev_info->dev.kobj,
 					 &iio_base_dummy_group);
-	
+
 	if (ret) {
 		dev_err(dev_info->dev.parent,
 			"Failed to register sysfs hooks\n");
@@ -663,7 +663,7 @@ static int iio_device_register_sysfs(struct iio_dev *dev_info)
 			if (ret < 0)
 				goto error_clear_attrs;
 		}
-	if (dev_info->name) { 
+	if (dev_info->name) {
 		ret = sysfs_add_file_to_group(&dev_info->dev.kobj,
 					      &dev_attr_name.attr,
 					      NULL);
@@ -796,7 +796,8 @@ static ssize_t iio_ev_value_store(struct device *dev,
 static int iio_device_add_event_sysfs(struct iio_dev *dev_info,
 				      struct iio_chan_spec const *chan)
 {
-	int ret = 0, i, mask = 0;
+	int ret = 0, i;
+	u64 mask = 0;
 	char *postfix;
 	if (!chan->event_mask)
 		return 0;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio: capfun: fix - mask must be type u64
  2011-08-18 12:01 [PATCH] iio: capfun: fix - mask must be type u64 michael.hennerich
@ 2011-08-19 10:26 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2011-08-19 10:26 UTC (permalink / raw)
  To: michael.hennerich; +Cc: linux-iio, device-drivers-devel, drivers

On 08/18/11 13:01, michael.hennerich@analog.com wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
> 
> mask must be type u64 otherwise it won't hold a full event code
Fix merged to original patch.  Thanks and good spot.
All branches updated and pushed to iio-blue.git

(sorry all, nasty forces rebasing  so you'll probably have to create a patch set
of whatever you have on top and rebuild your local tree).

Going to be the case till these patches are in shape I'm afraid.

> 
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
> ---
>  drivers/staging/iio/iio_core.h          |    2 +-
>  drivers/staging/iio/industrialio-core.c |    9 +++++----
>  2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/iio/iio_core.h b/drivers/staging/iio/iio_core.h
> index 433952b..85ac5b2 100644
> --- a/drivers/staging/iio/iio_core.h
> +++ b/drivers/staging/iio/iio_core.h
> @@ -33,7 +33,7 @@ int __iio_add_chan_devattr(const char *postfix,
>  						struct device_attribute *attr,
>  						const char *buf,
>  						size_t len),
> -			   int mask,
> +			   u64 mask,
>  			   bool generic,
>  			   struct device *dev,
>  			   struct list_head *attr_list);
> diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
> index 4aa538f..35e81f8 100644
> --- a/drivers/staging/iio/industrialio-core.c
> +++ b/drivers/staging/iio/industrialio-core.c
> @@ -519,7 +519,7 @@ int __iio_add_chan_devattr(const char *postfix,
>  						struct device_attribute *attr,
>  						const char *buf,
>  						size_t len),
> -			   int mask,
> +			   u64 mask,
>  			   bool generic,
>  			   struct device *dev,
>  			   struct list_head *attr_list)
> @@ -643,7 +643,7 @@ static int iio_device_register_sysfs(struct iio_dev *dev_info)
>  	else
>  		ret = sysfs_create_group(&dev_info->dev.kobj,
>  					 &iio_base_dummy_group);
> -	
> +
>  	if (ret) {
>  		dev_err(dev_info->dev.parent,
>  			"Failed to register sysfs hooks\n");
> @@ -663,7 +663,7 @@ static int iio_device_register_sysfs(struct iio_dev *dev_info)
>  			if (ret < 0)
>  				goto error_clear_attrs;
>  		}
> -	if (dev_info->name) { 
> +	if (dev_info->name) {
>  		ret = sysfs_add_file_to_group(&dev_info->dev.kobj,
>  					      &dev_attr_name.attr,
>  					      NULL);
> @@ -796,7 +796,8 @@ static ssize_t iio_ev_value_store(struct device *dev,
>  static int iio_device_add_event_sysfs(struct iio_dev *dev_info,
>  				      struct iio_chan_spec const *chan)
>  {
> -	int ret = 0, i, mask = 0;
> +	int ret = 0, i;
> +	u64 mask = 0;
>  	char *postfix;
>  	if (!chan->event_mask)
>  		return 0;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-19 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-18 12:01 [PATCH] iio: capfun: fix - mask must be type u64 michael.hennerich
2011-08-19 10:26 ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.