mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
Second set of IIO fixes for IIO in the 4.11 cycle.
This series consists of fixes that either came in after the merge window
had opened or are fixes for work that merged during the merge window so had
to wait for that to hit mainline.
* 104-quad-8
- Fix an off by one error in the register address for the flag register.
* rcar-gyroadc
- protect against possible issues in future by dealing with childmode not
being in a valid state. This also deals with some build warnings.
* xilinx
- fix some error handling paths to ensure resources are released in
reverse order of being acquired.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAlixzPgRHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0FohnJw/+JQa8wHUc0RORLD42ahAdjxZBpGyEjvYo
R/F22n/kOlyUarGLyRql3RnlT5gxKA+DCLu9B5w0U888LCQMixl+EmbG+lOtI0yf
OPBsop4iVp4S65D6LYjWxYCWcYd9uaahFykQX6ODbOGrmMcIzpXAqzoLAaiF/sMX
jleXlczU0a++t1yOkjKvGjGHIbtm7BbOK4K4W4WCdZ/PExgeYgmw97XtKS1YXyXO
GEK0cgFTAS8uGBKYxkZaY4i7V0SCsstlyF/aZmm8YVJOrK+3vtNR7/KtpgXjMEgF
6JbA16QKlr730BH6iPVXWJngL5qQSIAUjaRNumIlfXQou5QLW/geycjtfKVrhc/K
Z8V1t8U9BJH8DCCP6NzZYmfsZWnRVDpQcIMfOWs9i9d2PzHKItUt2T/xSw3DatnD
U9HymqIQrKhMcva0j0BW/H4qRqqSyy82+eAq9/99IwPrga3Hh+e1RIOd1TkCTIZK
tu4LlEeW7Q7ne2MYhVjghQ/741/c1P79rXgvKfKoVe4DurKcA0dDO798oDicMVGc
nflShEO7qjKwEeEXl0NLfzEUrdatIXVSoC2/spiNXI+7xWwdEnmJFZueI8RU8Xpq
LxAKwaov6E/KrA/Lbmn5AqJF89/rP5NjkyyyKC+mTNG29dx/QuXXqPSRe+pyM2TZ
pGNdH/se8Ko=
=FhF5
-----END PGP SIGNATURE-----
Merge tag 'iio-fixes-for-4.11b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
Second set of IIO fixes for IIO in the 4.11 cycle.
This series consists of fixes that either came in after the merge window
had opened or are fixes for work that merged during the merge window so had
to wait for that to hit mainline.
* 104-quad-8
- Fix an off by one error in the register address for the flag register.
* rcar-gyroadc
- protect against possible issues in future by dealing with childmode not
being in a valid state. This also deals with some build warnings.
* xilinx
- fix some error handling paths to ensure resources are released in
reverse order of being acquired.
This commit is contained in:
commit
7aa2a92c49
|
|
@ -336,7 +336,7 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev)
|
|||
struct device_node *child;
|
||||
struct regulator *vref;
|
||||
unsigned int reg;
|
||||
unsigned int adcmode, childmode;
|
||||
unsigned int adcmode = -1, childmode;
|
||||
unsigned int sample_width;
|
||||
unsigned int num_channels;
|
||||
int ret, first = 1;
|
||||
|
|
@ -366,6 +366,8 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev)
|
|||
channels = rcar_gyroadc_iio_channels_3;
|
||||
num_channels = ARRAY_SIZE(rcar_gyroadc_iio_channels_3);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1208,7 +1208,7 @@ static int xadc_probe(struct platform_device *pdev)
|
|||
|
||||
ret = xadc->ops->setup(pdev, indio_dev, irq);
|
||||
if (ret)
|
||||
goto err_free_samplerate_trigger;
|
||||
goto err_clk_disable_unprepare;
|
||||
|
||||
ret = request_irq(irq, xadc->ops->interrupt_handler, 0,
|
||||
dev_name(&pdev->dev), indio_dev);
|
||||
|
|
@ -1268,6 +1268,8 @@ static int xadc_probe(struct platform_device *pdev)
|
|||
|
||||
err_free_irq:
|
||||
free_irq(irq, indio_dev);
|
||||
err_clk_disable_unprepare:
|
||||
clk_disable_unprepare(xadc->clk);
|
||||
err_free_samplerate_trigger:
|
||||
if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
|
||||
iio_trigger_free(xadc->samplerate_trigger);
|
||||
|
|
@ -1277,8 +1279,6 @@ static int xadc_probe(struct platform_device *pdev)
|
|||
err_triggered_buffer_cleanup:
|
||||
if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
|
||||
iio_triggered_buffer_cleanup(indio_dev);
|
||||
err_clk_disable_unprepare:
|
||||
clk_disable_unprepare(xadc->clk);
|
||||
err_device_free:
|
||||
kfree(indio_dev->channels);
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ static int quad8_read_raw(struct iio_dev *indio_dev,
|
|||
return IIO_VAL_INT;
|
||||
}
|
||||
|
||||
flags = inb(base_offset);
|
||||
flags = inb(base_offset + 1);
|
||||
borrow = flags & BIT(0);
|
||||
carry = !!(flags & BIT(1));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user