Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755510AbcDNM6a (ORCPT ); Thu, 14 Apr 2016 08:58:30 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:31086 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755450AbcDNM6H (ORCPT ); Thu, 14 Apr 2016 08:58:07 -0400 From: Jisheng Zhang To: , , , CC: , , , Jisheng Zhang Subject: [PATCH 4/4] i2c: designware: remove runtime suspend prevention during registration Date: Thu, 14 Apr 2016 20:53:34 +0800 Message-ID: <1460638414-5987-5-git-send-email-jszhang@marvell.com> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1460638414-5987-1-git-send-email-jszhang@marvell.com> References: <1460638414-5987-1-git-send-email-jszhang@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-04-14_07:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603180000 definitions=main-1604140186 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1065 Lines: 32 Now all users make sure there won't be runtime suspend when calling i2c_dw_probe(), so we can remove the prevention code now. Signed-off-by: Jisheng Zhang --- drivers/i2c/busses/i2c-designware-core.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c index 99b54be..4255eaa 100644 --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c @@ -881,17 +881,9 @@ int i2c_dw_probe(struct dw_i2c_dev *dev) return r; } - /* - * Increment PM usage count during adapter registration in order to - * avoid possible spurious runtime suspend when adapter device is - * registered to the device core and immediate resume in case bus has - * registered I2C slaves that do I2C transfers in their probe. - */ - pm_runtime_get_noresume(dev->dev); r = i2c_add_numbered_adapter(adap); if (r) dev_err(dev->dev, "failure adding adapter: %d\n", r); - pm_runtime_put_noidle(dev->dev); return r; } -- 2.8.0.rc3