Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: max77686: Ensure device type IDs are architecture agnostic

Extinguishes:

../drivers/mfd/max77686.c: In function ‘max77686_i2c_probe’:
../drivers/mfd/max77686.c:254:20:
warning: cast from pointer to integer of different size

Signed-off-by: Lee Jones <lee.jones@linaro.org>

Lee Jones ec8bd566 a259f389

+3 -4
+2 -3
drivers/mfd/max77686.c
··· 251 251 if (!match) 252 252 return -EINVAL; 253 253 254 - max77686->type = (int)match->data; 255 - } else { 254 + max77686->type = (unsigned long)match->data; 255 + } else 256 256 max77686->type = id->driver_data; 257 - } 258 257 259 258 i2c_set_clientdata(i2c, max77686); 260 259 max77686->dev = &i2c->dev;
+1 -1
include/linux/mfd/max77686-private.h
··· 439 439 struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */ 440 440 struct i2c_client *rtc; /* slave addr 0x0c */ 441 441 442 - int type; 442 + unsigned long type; 443 443 444 444 struct regmap *regmap; /* regmap for mfd */ 445 445 struct regmap *rtc_regmap; /* regmap for rtc */