Skip to content

Commit

Permalink
Merge tag 'iio-fixes-for-4.6c' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/jic23/iio into staging-linus

Jonathan writes:

3rd set of IIO fixes for the 4.6 cycle.

* ak8975
  - fix a null pointer exception if an interrupt occurs during probe.
  - fix a maybe-unitialized warning.
* at91-sama5d2
  - fix a crash on removal of the module.
  • Loading branch information
Greg Kroah-Hartman committed Apr 26, 2016
2 parents bf16200 + 8e6cb47 commit 431adc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions drivers/iio/adc/at91-sama5d2_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ static int at91_adc_probe(struct platform_device *pdev)
if (ret)
goto vref_disable;

platform_set_drvdata(pdev, indio_dev);

ret = iio_device_register(indio_dev);
if (ret < 0)
goto per_clk_disable_unprepare;
Expand Down
6 changes: 3 additions & 3 deletions drivers/iio/magnetometer/ak8975.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ static int ak8975_setup_irq(struct ak8975_data *data)
int rc;
int irq;

init_waitqueue_head(&data->data_ready_queue);
clear_bit(0, &data->flags);
if (client->irq)
irq = client->irq;
else
Expand All @@ -477,8 +479,6 @@ static int ak8975_setup_irq(struct ak8975_data *data)
return rc;
}

init_waitqueue_head(&data->data_ready_queue);
clear_bit(0, &data->flags);
data->eoc_irq = irq;

return rc;
Expand Down Expand Up @@ -732,7 +732,7 @@ static int ak8975_probe(struct i2c_client *client,
int eoc_gpio;
int err;
const char *name = NULL;
enum asahi_compass_chipset chipset;
enum asahi_compass_chipset chipset = AK_MAX_TYPE;

/* Grab and set up the supplied GPIO. */
if (client->dev.platform_data)
Expand Down

0 comments on commit 431adc0

Please sign in to comment.