aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/muxes/i2c-demux-pinctrl.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2019-05-03 15:20:04 +0200
committerWolfram Sang <wsa@the-dreams.de>2019-05-03 15:20:58 +0200
commitd00afd5ede1c29a6dc59be2d7fb7d6ef28eb85c5 (patch)
treee194b1968e54380a6654abf7d3a037ca0a010280 /drivers/i2c/muxes/i2c-demux-pinctrl.c
parentMerge tag 'at24-v5.2-updates-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-5.2 (diff)
parenti2c: mux: demux-pinctrl: use struct_size() in devm_kzalloc() (diff)
downloadlinux-dev-d00afd5ede1c29a6dc59be2d7fb7d6ef28eb85c5.tar.xz
linux-dev-d00afd5ede1c29a6dc59be2d7fb7d6ef28eb85c5.zip
Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-5.2
Mainly some pca954x work, i.e. removal of unused platform data support and added support for sysfs interface for manipulating/examining the idle state. And then a mechanical cocci-style patch.
Diffstat (limited to 'drivers/i2c/muxes/i2c-demux-pinctrl.c')
-rw-r--r--drivers/i2c/muxes/i2c-demux-pinctrl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c
index d50454c565ee..4eecffc26527 100644
--- a/drivers/i2c/muxes/i2c-demux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c
@@ -221,8 +221,8 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)
return -EINVAL;
}
- priv = devm_kzalloc(&pdev->dev, sizeof(*priv)
- + num_chan * sizeof(struct i2c_demux_pinctrl_chan), GFP_KERNEL);
+ priv = devm_kzalloc(&pdev->dev, struct_size(priv, chan, num_chan),
+ GFP_KERNEL);
props = devm_kcalloc(&pdev->dev, num_chan, sizeof(*props), GFP_KERNEL);