Skip to content

Commit

Permalink
staging:iio:trigger:sysfs trigger: Add a release function to avoid wa…
Browse files Browse the repository at this point in the history
…rning on module removal.

The device is static and should never actually be deleted. The release
is just to avoid a warning from the kernel.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Aug 24, 2011
1 parent 82db424 commit 9c0c22b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/staging/iio/trigger/iio-trig-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,16 @@ static const struct attribute_group *iio_sysfs_trig_groups[] = {
NULL
};


/* Nothing to actually do upon release */
static void iio_trigger_sysfs_release(struct device *dev)
{
}

static struct device iio_sysfs_trig_dev = {
.bus = &iio_bus_type,
.groups = iio_sysfs_trig_groups,
.release = &iio_trigger_sysfs_release,
};

static ssize_t iio_sysfs_trigger_poll(struct device *dev,
Expand Down

0 comments on commit 9c0c22b

Please sign in to comment.