* [PATCH] staging: iio: Staticise non-exported functions
@ 2010-02-18 17:19 Mark Brown
2010-02-18 17:52 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2010-02-18 17:19 UTC (permalink / raw)
To: Jonathan Cameron, Greg Kroah-Hartman; +Cc: linux-kernel, Mark Brown
Staticise a number of functions which aren't exported outside their
source files, and also add a __user annotation for the buffer in
iio_event_chrdev_read().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/staging/iio/industrialio-core.c | 14 +++++++-------
drivers/staging/iio/trigger_consumer.h | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index 4ff683a..b456dfc 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -118,7 +118,7 @@ int iio_push_event(struct iio_dev *dev_info,
EXPORT_SYMBOL(iio_push_event);
/* Generic interrupt line interrupt handler */
-irqreturn_t iio_interrupt_handler(int irq, void *_int_info)
+static irqreturn_t iio_interrupt_handler(int irq, void *_int_info)
{
struct iio_interrupt *int_info = _int_info;
struct iio_dev *dev_info = int_info->dev_info;
@@ -252,10 +252,10 @@ void iio_remove_event_from_list(struct iio_event_handler_list *el,
}
EXPORT_SYMBOL(iio_remove_event_from_list);
-ssize_t iio_event_chrdev_read(struct file *filep,
- char *buf,
- size_t count,
- loff_t *f_ps)
+static ssize_t iio_event_chrdev_read(struct file *filep,
+ char __user *buf,
+ size_t count,
+ loff_t *f_ps)
{
struct iio_event_interface *ev_int = filep->private_data;
struct iio_detected_event_list *el;
@@ -313,7 +313,7 @@ error_ret:
return ret;
}
-int iio_event_chrdev_release(struct inode *inode, struct file *filep)
+static int iio_event_chrdev_release(struct inode *inode, struct file *filep)
{
struct iio_handler *hand = iio_cdev_to_handler(inode->i_cdev);
struct iio_event_interface *ev_int = hand->private;
@@ -335,7 +335,7 @@ int iio_event_chrdev_release(struct inode *inode, struct file *filep)
return 0;
}
-int iio_event_chrdev_open(struct inode *inode, struct file *filep)
+static int iio_event_chrdev_open(struct inode *inode, struct file *filep)
{
struct iio_handler *hand = iio_cdev_to_handler(inode->i_cdev);
struct iio_event_interface *ev_int = hand->private;
diff --git a/drivers/staging/iio/trigger_consumer.h b/drivers/staging/iio/trigger_consumer.h
index a02d70b..9d52d96 100644
--- a/drivers/staging/iio/trigger_consumer.h
+++ b/drivers/staging/iio/trigger_consumer.h
@@ -27,7 +27,7 @@ int iio_device_unregister_trigger_consumer(struct iio_dev *dev_info);
* iio_device_register_trigger_consumer() - set up an iio_dev to use triggers
* @dev_info: iio_dev associated with the device that will consume the trigger
**/
-int iio_device_register_trigger_consumer(struct iio_dev *dev_info)
+static int iio_device_register_trigger_consumer(struct iio_dev *dev_info)
{
return 0;
};
@@ -36,7 +36,7 @@ int iio_device_register_trigger_consumer(struct iio_dev *dev_info)
* iio_device_unregister_trigger_consumer() - reverse the registration process
* @dev_info: iio_dev associated with the device that consumed the trigger
**/
-int iio_device_unregister_trigger_consumer(struct iio_dev *dev_info)
+static int iio_device_unregister_trigger_consumer(struct iio_dev *dev_info)
{
return 0;
};
--
1.7.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: iio: Staticise non-exported functions
2010-02-18 17:19 [PATCH] staging: iio: Staticise non-exported functions Mark Brown
@ 2010-02-18 17:52 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2010-02-18 17:52 UTC (permalink / raw)
To: Mark Brown; +Cc: Greg Kroah-Hartman, linux-kernel
On 02/18/10 17:19, Mark Brown wrote:
> Staticise a number of functions which aren't exported outside their
> source files, and also add a __user annotation for the buffer in
> iio_event_chrdev_read().
Thanks,
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
> ---
> drivers/staging/iio/industrialio-core.c | 14 +++++++-------
> drivers/staging/iio/trigger_consumer.h | 4 ++--
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
> index 4ff683a..b456dfc 100644
> --- a/drivers/staging/iio/industrialio-core.c
> +++ b/drivers/staging/iio/industrialio-core.c
> @@ -118,7 +118,7 @@ int iio_push_event(struct iio_dev *dev_info,
> EXPORT_SYMBOL(iio_push_event);
>
> /* Generic interrupt line interrupt handler */
> -irqreturn_t iio_interrupt_handler(int irq, void *_int_info)
> +static irqreturn_t iio_interrupt_handler(int irq, void *_int_info)
> {
> struct iio_interrupt *int_info = _int_info;
> struct iio_dev *dev_info = int_info->dev_info;
> @@ -252,10 +252,10 @@ void iio_remove_event_from_list(struct iio_event_handler_list *el,
> }
> EXPORT_SYMBOL(iio_remove_event_from_list);
>
> -ssize_t iio_event_chrdev_read(struct file *filep,
> - char *buf,
> - size_t count,
> - loff_t *f_ps)
> +static ssize_t iio_event_chrdev_read(struct file *filep,
> + char __user *buf,
> + size_t count,
> + loff_t *f_ps)
> {
> struct iio_event_interface *ev_int = filep->private_data;
> struct iio_detected_event_list *el;
> @@ -313,7 +313,7 @@ error_ret:
> return ret;
> }
>
> -int iio_event_chrdev_release(struct inode *inode, struct file *filep)
> +static int iio_event_chrdev_release(struct inode *inode, struct file *filep)
> {
> struct iio_handler *hand = iio_cdev_to_handler(inode->i_cdev);
> struct iio_event_interface *ev_int = hand->private;
> @@ -335,7 +335,7 @@ int iio_event_chrdev_release(struct inode *inode, struct file *filep)
> return 0;
> }
>
> -int iio_event_chrdev_open(struct inode *inode, struct file *filep)
> +static int iio_event_chrdev_open(struct inode *inode, struct file *filep)
> {
> struct iio_handler *hand = iio_cdev_to_handler(inode->i_cdev);
> struct iio_event_interface *ev_int = hand->private;
> diff --git a/drivers/staging/iio/trigger_consumer.h b/drivers/staging/iio/trigger_consumer.h
> index a02d70b..9d52d96 100644
> --- a/drivers/staging/iio/trigger_consumer.h
> +++ b/drivers/staging/iio/trigger_consumer.h
> @@ -27,7 +27,7 @@ int iio_device_unregister_trigger_consumer(struct iio_dev *dev_info);
> * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers
> * @dev_info: iio_dev associated with the device that will consume the trigger
> **/
> -int iio_device_register_trigger_consumer(struct iio_dev *dev_info)
> +static int iio_device_register_trigger_consumer(struct iio_dev *dev_info)
> {
> return 0;
> };
> @@ -36,7 +36,7 @@ int iio_device_register_trigger_consumer(struct iio_dev *dev_info)
> * iio_device_unregister_trigger_consumer() - reverse the registration process
> * @dev_info: iio_dev associated with the device that consumed the trigger
> **/
> -int iio_device_unregister_trigger_consumer(struct iio_dev *dev_info)
> +static int iio_device_unregister_trigger_consumer(struct iio_dev *dev_info)
> {
> return 0;
> };
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-18 17:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-18 17:19 [PATCH] staging: iio: Staticise non-exported functions Mark Brown
2010-02-18 17:52 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome