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

Commit f30c0c32 authored by David Howells's avatar David Howells Committed by Linus Torvalds
Browse files

drivers/mfd/max8998.c: fix pointer-integer size mismatch warning in max8998_i2c_get_driver_data()



Fix up the following pointer-integer size mismatch warning in
max8998_i2c_get_driver_data():

	drivers/mfd/max8998.c: In function 'max8998_i2c_get_driver_data':
	drivers/mfd/max8998.c:178:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
		return (int)match->data;
		       ^

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Mark Brown <broonie@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e13e64ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -175,7 +175,7 @@ static inline int max8998_i2c_get_driver_data(struct i2c_client *i2c,
	if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) {
	if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) {
		const struct of_device_id *match;
		const struct of_device_id *match;
		match = of_match_node(max8998_dt_match, i2c->dev.of_node);
		match = of_match_node(max8998_dt_match, i2c->dev.of_node);
		return (int)match->data;
		return (int)(long)match->data;
	}
	}


	return (int)id->driver_data;
	return (int)id->driver_data;