diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-pca954x.c | 4 | ||||
-rw-r--r-- | drivers/mtd/nor/cfi_flash.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 0d5515b716..395254cdca 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -180,6 +180,7 @@ static int pca954x_probe(struct device_d *dev) struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent); int num, force; struct pca954x *data; + uintptr_t tmp; int ret = -ENODEV; int gpio; @@ -203,7 +204,8 @@ static int pca954x_probe(struct device_d *dev) goto exit_free; } - ret = dev_get_drvdata(dev, (const void **)&data->type); + ret = dev_get_drvdata(dev, (const void **)&tmp); + data->type = tmp; if (ret) goto exit_free; diff --git a/drivers/mtd/nor/cfi_flash.c b/drivers/mtd/nor/cfi_flash.c index 5bdcccae18..01ab1aa274 100644 --- a/drivers/mtd/nor/cfi_flash.c +++ b/drivers/mtd/nor/cfi_flash.c @@ -515,7 +515,7 @@ static int write_buff(struct flash_info *info, const u8 *src, int buffered_size; #endif /* get lower aligned address */ - wp = addr & ~(info->portwidth - 1); + wp = addr & ~((unsigned long)info->portwidth - 1); /* handle unaligned start */ aln = addr - wp; |