projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dm: power: Add a new driver for the TPS65090 PMIC
[oweals/u-boot.git]
/
drivers
/
i2c
/
fsl_i2c.c
diff --git
a/drivers/i2c/fsl_i2c.c
b/drivers/i2c/fsl_i2c.c
index 7bb1702bba283aa5b58000e12a4a3187a909137e..ff7f25a0ef7cdf2ce46cecc7954e654bc0d0d853 100644
(file)
--- a/
drivers/i2c/fsl_i2c.c
+++ b/
drivers/i2c/fsl_i2c.c
@@
-127,7
+127,7
@@
static const struct {
static unsigned int set_i2c_bus_speed(const struct fsl_i2c *dev,
unsigned int i2c_clk, unsigned int speed)
{
static unsigned int set_i2c_bus_speed(const struct fsl_i2c *dev,
unsigned int i2c_clk, unsigned int speed)
{
- unsigned short divider = min(i2c_clk / speed, (unsigned
short) -1
);
+ unsigned short divider = min(i2c_clk / speed, (unsigned
int)USHRT_MAX
);
/*
* We want to choose an FDR/DFSR that generates an I2C bus speed that
/*
* We want to choose an FDR/DFSR that generates an I2C bus speed that