Skip to content

Commit

Permalink
platform: msm_shared: i2c_qup: Unset dev_addr in qup_i2c_deinit()
Browse files Browse the repository at this point in the history
The i2c_qup driver currently only supports one active I2c controller
at the same time, because a global variable is used to point to the
struct for use in the interrupt handler. While the struct is freed
in qup_i2c_deinit(), the global dev_addr variable is not unset, which
means that it is impossible to register another I2C controller later.

Make sure to unset the variable to fix this. (Ideally the driver would
support multiple active controllers, though.)
  • Loading branch information
stephan-gh committed Feb 21, 2022
1 parent 7e9eafe commit d0d6538
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions platform/msm_shared/i2c_qup.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,5 +783,6 @@ int qup_i2c_deinit(struct qup_i2c_dev *dev)
mask_interrupt(dev->qup_irq);
/* Free the memory used for dev */
free(dev);
dev_addr = NULL;
return 0;
}

0 comments on commit d0d6538

Please sign in to comment.