Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268599
b: refs/heads/master
c: 8cbb36a
h: refs/heads/master
i:
  268597: 969e260
  268595: 0c12cea
  268591: ba3c78e
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Oct 3, 2011
1 parent 453050f commit 6c4945e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f5495d0a5c3a4a0174ad8e7eca2ad579d03deff
refs/heads/master: 8cbb36a0236954527a8f7b66145f786d09b55ab9
4 changes: 1 addition & 3 deletions trunk/drivers/staging/iio/adc/ad7606.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ struct ad7606_state {
struct work_struct poll_work;
wait_queue_head_t wq_data_avail;
const struct ad7606_bus_ops *bops;
int irq;
unsigned id;
unsigned range;
unsigned oversampling;
bool done;
Expand All @@ -94,7 +92,7 @@ void ad7606_resume(struct iio_dev *indio_dev);
struct iio_dev *ad7606_probe(struct device *dev, int irq,
void __iomem *base_address, unsigned id,
const struct ad7606_bus_ops *bops);
int ad7606_remove(struct iio_dev *indio_dev);
int ad7606_remove(struct iio_dev *indio_dev, int irq);
int ad7606_reset(struct ad7606_state *st);

enum ad7606_supported_device_ids {
Expand Down
10 changes: 4 additions & 6 deletions trunk/drivers/staging/iio/adc/ad7606_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,6 @@ struct iio_dev *ad7606_probe(struct device *dev, int irq,
st = iio_priv(indio_dev);

st->dev = dev;
st->id = id;
st->irq = irq;
st->bops = bops;
st->base_address = base_address;
st->range = pdata->default_range == 10000 ? 10000 : 5000;
Expand Down Expand Up @@ -501,7 +499,7 @@ struct iio_dev *ad7606_probe(struct device *dev, int irq,
if (ret)
dev_warn(st->dev, "failed to RESET: no RESET GPIO specified\n");

ret = request_irq(st->irq, ad7606_interrupt,
ret = request_irq(irq, ad7606_interrupt,
IRQF_TRIGGER_FALLING, st->chip_info->name, indio_dev);
if (ret)
goto error_free_gpios;
Expand All @@ -527,7 +525,7 @@ struct iio_dev *ad7606_probe(struct device *dev, int irq,
ad7606_ring_cleanup(indio_dev);

error_free_irq:
free_irq(st->irq, indio_dev);
free_irq(irq, indio_dev);

error_free_gpios:
ad7606_free_gpios(st);
Expand All @@ -543,14 +541,14 @@ struct iio_dev *ad7606_probe(struct device *dev, int irq,
return ERR_PTR(ret);
}

int ad7606_remove(struct iio_dev *indio_dev)
int ad7606_remove(struct iio_dev *indio_dev, int irq)
{
struct ad7606_state *st = iio_priv(indio_dev);

iio_buffer_unregister(indio_dev);
ad7606_ring_cleanup(indio_dev);

free_irq(st->irq, indio_dev);
free_irq(irq, indio_dev);
if (!IS_ERR(st->reg)) {
regulator_disable(st->reg);
regulator_put(st->reg);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/iio/adc/ad7606_par.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static int __devexit ad7606_par_remove(struct platform_device *pdev)
struct resource *res;
struct ad7606_state *st = iio_priv(indio_dev);

ad7606_remove(indio_dev);
ad7606_remove(indio_dev, platform_get_irq(pdev, 0));

iounmap(st->base_address);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/iio/adc/ad7606_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static int __devexit ad7606_spi_remove(struct spi_device *spi)
{
struct iio_dev *indio_dev = dev_get_drvdata(&spi->dev);

return ad7606_remove(indio_dev);
return ad7606_remove(indio_dev, spi->irq);
}

#ifdef CONFIG_PM
Expand Down

0 comments on commit 6c4945e

Please sign in to comment.