From patchwork Thu Dec 17 18:04:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 7875941 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2ED3B9F349 for ; Thu, 17 Dec 2015 18:06:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B9D32041D for ; Thu, 17 Dec 2015 18:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63E2320416 for ; Thu, 17 Dec 2015 18:06:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752283AbbLQSGE (ORCPT ); Thu, 17 Dec 2015 13:06:04 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:44394 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751219AbbLQSGD (ORCPT ); Thu, 17 Dec 2015 13:06:03 -0500 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NZI019L3KXWVO20@mailout1.samsung.com>; Fri, 18 Dec 2015 03:06:00 +0900 (KST) X-AuditID: cbfee61b-f793c6d00000236c-33-5672f988c15a Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 01.19.09068.889F2765; Fri, 18 Dec 2015 03:06:00 +0900 (KST) Received: from amdc1976.localnet ([106.120.53.102]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NZI001MJKXZOB90@mmp1.samsung.com>; Fri, 18 Dec 2015 03:06:00 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Viresh Kumar , Lee Jones , "Rafael J. Wysocki" Cc: Stephen Boyd , nm@ti.com, linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Bartlomiej Zolnierkiewicz , Dmitry Torokhov , Greg Kroah-Hartman , Len Brown , open list , Pavel Machek , Shawn Guo , linux-samsung-soc@vger.kernel.org Subject: [PATCH v2] PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties Date: Thu, 17 Dec 2015 19:04:38 +0100 Message-id: <1471955.ORlHo2b56O@amdc1976> User-Agent: KMail/4.13.3 (Linux/3.13.0-63-generic; KDE/4.13.3; x86_64; ; ) MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42I5/e+xgG7Hz6Iwg+O3jCw2zljPajGzaTur RfPi9WwW978eZbSYNWUvk8X7Q8+YLS7vmsNm8bn3CKPFjPP7mCze/DjLZHH31FE2i8cr3rJb /DjTzWLxYou4xcavHg78HrMbLrJ4XO7rZfJYvOclk8emVZ1sHneu7WHz2D93DbvH7X+PmT36 tqxi9Dh+YzuTx4rV39k9Pm+SC+CO4rJJSc3JLEst0rdL4MrY2fOMtWAaT8WaPweYGhgncnUx cnJICJhIPHmyghnCFpO4cG89WxcjF4eQwFJGie2f7zGBJIQEvjJK9PyKArHZBKwkJravYgQp EhFoYJSYunM9E4jDLLCJWeLdrttgo4QFIiSuzm9mBLFZBFQlthzYzA5i8wpoSvz9dpIFxBYV 8JJ4/3MuM0RcUOLH5HtgcWYBeYl9+6eyQthaEut3HmeawMg3C0nZLCRls5CULWBkXsUokVqQ XFCclJ5rlJdarlecmFtcmpeul5yfu4kRHEfPpHcwHt7lfohRgINRiYdXYF9hmBBrYllxZe4h RgkOZiURXvvXRWFCvCmJlVWpRfnxRaU5qcWHGKU5WJTEefddigwTEkhPLEnNTk0tSC2CyTJx cEo1MPbXc/ublh62jYleeiFyjrd10uWAlPqKgHpHaeWSmJIQyWl/bK9OcDpyWz3y0rnEl2VF zTOVvjdxfKpT0xM5Xn0jNPDG6k+bp2xd4rQods5iftHo/qMJj5yOGmZunqwbXCCk8H69+trr piVC9cab7vdZsTas5vlg9DPkwrVlfzqOSqhdVhK+rcRSnJFoqMVcVJwIAH0ckC6fAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 01fb4d3c39d3 ("PM / OPP: Parse 'opp--' bindings") broke support for parsing standard opp-microvolt and opp-microamp properties. Fix it by setting 'name' string to proper value for !prop cases. Cc: Viresh Kumar Cc: Lee Jones Cc: Rafael J. Wysocki Fixes: 01fb4d3c39d3 ("PM / OPP: Parse 'opp-- 'bindings") Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Viresh Kumar --- v2: - rework the changes as requested by Viresh This fixes Exynos4x12 cpufreq-dt suppport regression present in linux-pm/linux-next tree. Rafael, please apply. Thank you. drivers/base/power/opp/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: b/drivers/base/power/opp/core.c =================================================================== --- a/drivers/base/power/opp/core.c 2015-12-17 18:57:27.358981831 +0100 +++ b/drivers/base/power/opp/core.c 2015-12-17 18:58:04.550982529 +0100 @@ -814,7 +814,7 @@ static int opp_parse_supplies(struct dev if (!prop) { /* Search for "opp-microvolt" */ - name[13] = '\0'; + sprintf(name, "opp-microvolt"); prop = of_find_property(opp->np, name, NULL); /* Missing property isn't a problem, but an invalid entry is */ @@ -855,7 +855,7 @@ static int opp_parse_supplies(struct dev if (!prop) { /* Search for "opp-microamp" */ - name[12] = '\0'; + sprintf(name, "opp-microamp"); prop = of_find_property(opp->np, name, NULL); }