Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f34163c authored by Heiko Stübner's avatar Heiko Stübner Committed by Mark Brown
Browse files

regulator: fan53555: fix wrong cast in probe



The vendor-id gathered from the dt match-data was cast to int but assigned
to an unsigned long, producing warnings on at least sparc, like

   drivers/regulator/fan53555.c: In function 'fan53555_regulator_probe':
>> drivers/regulator/fan53555.c:373:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      di->vendor = (int) match->data;

Fix this by using an appropriate cast.

Reported-by: kbuild test robot
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ee30928a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -370,7 +370,7 @@ static int fan53555_regulator_probe(struct i2c_client *client,
		if (!match)
			return -ENODEV;

		di->vendor = (int) match->data;
		di->vendor = (unsigned long) match->data;
	} else {
		/* if no ramp constraint set, get the pdata ramp_delay */
		if (!di->regulator->constraints.ramp_delay) {