staging: iio_simple_dummy: fix return types

The functions iio_dummy_remove(), iio_simple_dummy_events_unregister() and
iio_dummy_evgen_release_irq() were changed to return void instead of int.

Signed-off-by: Vladimirs Ambrosovs <rodriguez.twister@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Vladimirs Ambrosovs 2015-05-30 11:20:16 +03:00 committed by Jonathan Cameron
parent b3f6af36e5
commit 62a90da69d
5 changed files with 8 additions and 20 deletions

View File

@ -128,13 +128,11 @@ EXPORT_SYMBOL_GPL(iio_dummy_evgen_get_irq);
*
* Used by client driver instances to give the irqs back when they disconnect
*/
int iio_dummy_evgen_release_irq(int irq)
void iio_dummy_evgen_release_irq(int irq)
{
mutex_lock(&iio_evgen->lock);
iio_evgen->inuse[irq - iio_evgen->base] = false;
mutex_unlock(&iio_evgen->lock);
return 0;
}
EXPORT_SYMBOL_GPL(iio_dummy_evgen_release_irq);

View File

@ -8,6 +8,6 @@ struct iio_dummy_regs {
struct iio_dummy_regs *iio_dummy_evgen_get_regs(int irq);
int iio_dummy_evgen_get_irq(void);
int iio_dummy_evgen_release_irq(int irq);
void iio_dummy_evgen_release_irq(int irq);
#endif /* _IIO_DUMMY_EVGEN_H_ */

View File

@ -665,9 +665,8 @@ static int iio_dummy_probe(int index)
*
* Parameters follow those of iio_dummy_probe for buses.
*/
static int iio_dummy_remove(int index)
static void iio_dummy_remove(int index)
{
int ret;
/*
* Get a pointer to the device instance iio_dev structure
* from the bus subsystem. E.g.
@ -685,15 +684,10 @@ static int iio_dummy_remove(int index)
/* Buffered capture related cleanup */
iio_simple_dummy_unconfigure_buffer(indio_dev);
ret = iio_simple_dummy_events_unregister(indio_dev);
if (ret)
goto error_ret;
iio_simple_dummy_events_unregister(indio_dev);
/* Free all structures */
iio_device_free(indio_dev);
error_ret:
return ret;
}
/**

View File

@ -79,7 +79,7 @@ int iio_simple_dummy_write_event_value(struct iio_dev *indio_dev,
int val2);
int iio_simple_dummy_events_register(struct iio_dev *indio_dev);
int iio_simple_dummy_events_unregister(struct iio_dev *indio_dev);
void iio_simple_dummy_events_unregister(struct iio_dev *indio_dev);
#else /* Stubs for when events are disabled at compile time */
@ -89,11 +89,9 @@ iio_simple_dummy_events_register(struct iio_dev *indio_dev)
return 0;
};
static inline int
static inline void
iio_simple_dummy_events_unregister(struct iio_dev *indio_dev)
{
return 0;
};
{ };
#endif /* CONFIG_IIO_SIMPLE_DUMMY_EVENTS*/

View File

@ -257,13 +257,11 @@ int iio_simple_dummy_events_register(struct iio_dev *indio_dev)
* iio_simple_dummy_events_unregister() - tidy up interrupt handling on remove
* @indio_dev: device instance data
*/
int iio_simple_dummy_events_unregister(struct iio_dev *indio_dev)
void iio_simple_dummy_events_unregister(struct iio_dev *indio_dev)
{
struct iio_dummy_state *st = iio_priv(indio_dev);
free_irq(st->event_irq, indio_dev);
/* Not part of normal driver */
iio_dummy_evgen_release_irq(st->event_irq);
return 0;
}