Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753741AbbEGKIm (ORCPT ); Thu, 7 May 2015 06:08:42 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:48092 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752892AbbEGJts (ORCPT ); Thu, 7 May 2015 05:49:48 -0400 From: Luis Henriques To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Charles Keepax , Wolfram Sang , Luis Henriques Subject: [PATCH 3.16.y-ckt 141/180] i2c: Mark adapter devices with pm_runtime_no_callbacks Date: Thu, 7 May 2015 10:45:50 +0100 Message-Id: <1430991989-23170-142-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1430991989-23170-1-git-send-email-luis.henriques@canonical.com> References: <1430991989-23170-1-git-send-email-luis.henriques@canonical.com> X-Extended-Stable: 3.16 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1844 Lines: 46 3.16.7-ckt11 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Charles Keepax commit 6ada5c1e1b077ab98fc144d7ac132b4dcc0148ec upstream. Commit 523c5b89640e ("i2c: Remove support for legacy PM") removed the PM ops from the bus type, which causes the pm operations on the s3c2410 adapter device to fail (-ENOSUPP in rpm_callback). The adapter device doesn't get bound to a driver and as such can't have its own pm_runtime callbacks. Previously this was fine as the bus callbacks would have been used, but now this can cause devices which use PM runtime and are attached over I2C to fail to resume. This commit fixes this issue by marking all adapter devices with pm_runtime_no_callbacks, since they can't have any. Signed-off-by: Charles Keepax Acked-by: Beata Michalska Signed-off-by: Wolfram Sang Fixes: 523c5b89640e Signed-off-by: Luis Henriques --- drivers/i2c/i2c-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 7c7f4b856bad..4c349b119642 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1249,6 +1249,8 @@ static int i2c_register_adapter(struct i2c_adapter *adap) dev_dbg(&adap->dev, "adapter [%s] registered\n", adap->name); + pm_runtime_no_callbacks(&adap->dev); + #ifdef CONFIG_I2C_COMPAT res = class_compat_create_link(i2c_adapter_compat_class, &adap->dev, adap->dev.parent); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/