Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41c77524 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman
Browse files

staging:iio:core clean out unused elements.



Trivial cleanup of things that have fallen by the way.

Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1f785681
Loading
Loading
Loading
Loading
+0 −13
Original line number Original line Diff line number Diff line
@@ -25,8 +25,6 @@
/* Event interface flags */
/* Event interface flags */
#define IIO_BUSY_BIT_POS 1
#define IIO_BUSY_BIT_POS 1


struct iio_dev;

/* naughty temporary hack to match these against the event version
/* naughty temporary hack to match these against the event version
   - need to flattern these together */
   - need to flattern these together */
enum iio_chan_type {
enum iio_chan_type {
@@ -221,7 +219,6 @@ static inline s64 iio_get_time_ns(void)
 *			ownership of chrdevs etc
 *			ownership of chrdevs etc
 * @num_interrupt_lines:[DRIVER] number of physical interrupt lines from device
 * @num_interrupt_lines:[DRIVER] number of physical interrupt lines from device
 * @event_attrs:	[DRIVER] event control attributes
 * @event_attrs:	[DRIVER] event control attributes
 * @event_conf_attrs:	[DRIVER] event configuration attributes
 * @event_interfaces:	[INTERN] event chrdevs associated with interrupt lines
 * @event_interfaces:	[INTERN] event chrdevs associated with interrupt lines
 * @ring:		[DRIVER] any ring buffer present
 * @ring:		[DRIVER] any ring buffer present
 * @mlock:		[INTERN] lock used to prevent simultaneous device state
 * @mlock:		[INTERN] lock used to prevent simultaneous device state
@@ -259,8 +256,6 @@ struct iio_dev {


	int				num_interrupt_lines;
	int				num_interrupt_lines;
	struct attribute_group		*event_attrs;
	struct attribute_group		*event_attrs;
	struct attribute_group		*event_conf_attrs;

	struct iio_event_interface	*event_interfaces;
	struct iio_event_interface	*event_interfaces;


	struct iio_ring_buffer		*ring;
	struct iio_ring_buffer		*ring;
@@ -326,14 +321,6 @@ int iio_push_event(struct iio_dev *dev_info,
		  int ev_code,
		  int ev_code,
		  s64 timestamp);
		  s64 timestamp);


/**
 * iio_allocate_chrdev() - Allocate a chrdev
 * @handler:	struct that contains relevant file handling for chrdev
 * @dev_info:	iio_dev for which chrdev is being created
 **/
int iio_allocate_chrdev(struct iio_handler *handler, struct iio_dev *dev_info);
void iio_deallocate_chrdev(struct iio_handler *handler);

/* Used to distinguish between bipolar and unipolar scan elemenents.
/* Used to distinguish between bipolar and unipolar scan elemenents.
 * Whilst this may seem obvious, we may well want to change the representation
 * Whilst this may seem obvious, we may well want to change the representation
 * in the future!*/
 * in the future!*/
+2 −45
Original line number Original line Diff line number Diff line
@@ -998,21 +998,6 @@ static inline int __iio_add_event_config_attrs(struct iio_dev *dev_info, int i)
{
{
	int j;
	int j;
	int ret;
	int ret;
	struct attribute **attrp, **attrq;

	if (dev_info->event_conf_attrs && dev_info->event_conf_attrs[i].attrs) {
		attrp = dev_info->event_conf_attrs[i].attrs;
		while (*attrp) {
			ret =  sysfs_add_file_to_group(&dev_info
						       ->event_interfaces[0]
						       .dev.kobj,
						       *attrp,
						       NULL);
			if (ret)
				goto error_ret;
			attrp++;
		}
	}
	INIT_LIST_HEAD(&dev_info->event_interfaces[0].dev_attr_list);
	INIT_LIST_HEAD(&dev_info->event_interfaces[0].dev_attr_list);
	/* Dynically created from the channels array */
	/* Dynically created from the channels array */
	if (dev_info->channels) {
	if (dev_info->channels) {
@@ -1027,19 +1012,7 @@ static inline int __iio_add_event_config_attrs(struct iio_dev *dev_info, int i)
	return 0;
	return 0;


error_clear_attrs:
error_clear_attrs:
	__iio_remove_all_event_sysfs(dev_info,
	__iio_remove_all_event_sysfs(dev_info, NULL, i);
				     NULL,
				     i);
error_ret:
	attrq = dev_info->event_conf_attrs[i].attrs;
	while (attrq != attrp) {
			sysfs_remove_file_from_group(&dev_info
						     ->event_interfaces[0]
						     .dev.kobj,
						     *attrq,
						     NULL);
		attrq++;
	}


	return ret;
	return ret;
}
}
@@ -1047,23 +1020,7 @@ static inline int __iio_add_event_config_attrs(struct iio_dev *dev_info, int i)
static inline int __iio_remove_event_config_attrs(struct iio_dev *dev_info,
static inline int __iio_remove_event_config_attrs(struct iio_dev *dev_info,
						  int i)
						  int i)
{
{
	struct attribute **attrq;
	__iio_remove_all_event_sysfs(dev_info, NULL, i);
	__iio_remove_all_event_sysfs(dev_info,
				     NULL,
				     i);
	if (dev_info->event_conf_attrs
		&& dev_info->event_conf_attrs[i].attrs) {
		attrq = dev_info->event_conf_attrs[i].attrs;
		while (*attrq) {
			sysfs_remove_file_from_group(&dev_info
						     ->event_interfaces[0]
						     .dev.kobj,
						     *attrq,
						     NULL);
			attrq++;
		}
	}

	return 0;
	return 0;
}
}