Skip to content

Commit

Permalink
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Four driver bugfixes for the I2C subsystem"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: mux: reg: wrong condition checked for of_address_to_resource return value
  i2c: tegra: Correct error path in probe
  i2c: remove __init from i2c_register_board_info()
  i2c: qup: Fix wrong value of index variable
  • Loading branch information
Linus Torvalds committed Jul 15, 2016
2 parents 1f027f6 + 22ebf00 commit 1a86f94
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions drivers/i2c/busses/i2c-qup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,8 @@ static int qup_i2c_xfer_v2(struct i2c_adapter *adap,
}
}

idx = 0;

do {
if (msgs[idx].len == 0) {
ret = -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ static int tegra_i2c_probe(struct platform_device *pdev)
ret = tegra_i2c_init(i2c_dev);
if (ret) {
dev_err(&pdev->dev, "Failed to initialize i2c controller");
goto unprepare_div_clk;
goto disable_div_clk;
}

ret = devm_request_irq(&pdev->dev, i2c_dev->irq,
Expand Down
4 changes: 1 addition & 3 deletions drivers/i2c/i2c-boardinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ EXPORT_SYMBOL_GPL(__i2c_first_dynamic_bus_num);
* The board info passed can safely be __initdata, but be careful of embedded
* pointers (for platform_data, functions, etc) since that won't be copied.
*/
int __init
i2c_register_board_info(int busnum,
struct i2c_board_info const *info, unsigned len)
int i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned len)
{
int status;

Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/muxes/i2c-mux-reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux,
mux->data.idle_in_use = true;

/* map address from "reg" if exists */
if (of_address_to_resource(np, 0, &res)) {
if (of_address_to_resource(np, 0, &res) == 0) {
mux->data.reg_size = resource_size(&res);
mux->data.reg = devm_ioremap_resource(&pdev->dev, &res);
if (IS_ERR(mux->data.reg))
Expand Down

0 comments on commit 1a86f94

Please sign in to comment.