diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-03-07 15:35:49 +0100 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-03-25 12:06:37 +0100 |
commit | ef2b810e1152d77686032e7dc064ff89b4350b00 (patch) | |
tree | a392047e3bfe33192a2a8f9ca4e4d58fc149e26d /drivers/w1 | |
parent | w1: gpio: Switch to use dev_err_probe() (diff) | |
download | linux-ef2b810e1152d77686032e7dc064ff89b4350b00.tar.xz linux-ef2b810e1152d77686032e7dc064ff89b4350b00.zip |
w1: gpio: Use sizeof(*pointer) instead of sizeof(type)
It is preferred to use sizeof(*pointer) instead of sizeof(type).
The type of the variable can change and one needs not change
the former (unlike the latter). No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240307143644.3787260-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/masters/w1-gpio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index a5ac34b32f54..3881f2eaed2f 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -85,8 +85,7 @@ static int w1_gpio_probe(struct platform_device *pdev) if (device_property_present(dev, "linux,open-drain")) gflags = GPIOD_OUT_LOW; - master = devm_kzalloc(dev, sizeof(struct w1_bus_master), - GFP_KERNEL); + master = devm_kzalloc(dev, sizeof(*master), GFP_KERNEL); if (!master) return -ENOMEM; |