Merge tag ‘powerpc-5.1-7’ of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux [Linux 5.1]

Merge tag ‘powerpc-5.1-7’ of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux [Linux 5.1]

This Linux kernel change "Merge tag ‘powerpc-5.1-7’ of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux" is included in the Linux 5.1 release. This change is authored by Linus Torvalds <torvalds [at] linux-foundation.org> on Sat May 4 12:24:05 2019 -0700. The commit for this change in Linux stable tree is 6203838 (patch). Other info about this change: Merge: aa1be08 12f3635

Merge tag 'powerpc-5.1-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fix from Michael Ellerman:
 "One regression fix.

  Changes we merged to STRICT_KERNEL_RWX on 32-bit were causing crashes
  under load on some machines depending on memory layout.

  Thanks to Christophe Leroy"

* tag 'powerpc-5.1-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/32s: Fix BATs setting with CONFIG_STRICT_KERNEL_RWX

There is no are 0 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/i2c/i2c-core-base.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 38af186..8149c9e 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -327,6 +327,8 @@ static int i2c_device_probe(struct device *dev)

        if (client->flags & I2C_CLIENT_HOST_NOTIFY) {
            dev_dbg(dev, "Using Host Notify IRQ\n");
+           /* Keep adapter active when Host Notify is required */
+           pm_runtime_get_sync(&client->adapter->dev);
            irq = i2c_smbus_host_notify_to_irq(client);
        } else if (dev->of_node) {
            irq = of_irq_get_byname(dev->of_node, "irq");
@@ -431,6 +433,8 @@ static int i2c_device_remove(struct device *dev)
    device_init_wakeup(&client->dev, false);

    client->irq = client->init_irq;
+   if (client->flags & I2C_CLIENT_HOST_NOTIFY)
+       pm_runtime_put(&client->adapter->dev);

    return status;
 }

Leave a Reply

Your email address will not be published. Required fields are marked *