From patchwork Wed Jul 8 12:26:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 6746641 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 946A0C05AC for ; Wed, 8 Jul 2015 12:32:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C17B820675 for ; Wed, 8 Jul 2015 12:32:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E728620665 for ; Wed, 8 Jul 2015 12:32:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZCoU7-0007nv-Rc; Wed, 08 Jul 2015 12:29:55 +0000 Received: from mail-pd0-f171.google.com ([209.85.192.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZCoU4-0007gv-4M for linux-arm-kernel@lists.infradead.org; Wed, 08 Jul 2015 12:29:52 +0000 Received: by pdbqm3 with SMTP id qm3so1732969pdb.0 for ; Wed, 08 Jul 2015 05:29:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=o24pEnZokPgrYisjPtTxp1hwW+eKZMBeqDRD8rfwvHM=; b=X55elAEg+RH3Q5ExfNrM2AkQBJt291bc8B0jzOquoGJ3ZjXeRniJA0YA8FsszdLlm5 nKrZVBk/rFdlvUafXgdOMT0kp1PCPfIAyrCfmAzK2Jrv1SUYkjCgyQJlaQR7ccd1dEOy qwcGn4K8xAmBCzRTe1DE95K5Rp3pfwvt1qZDYcK8ZnPU0uI1fDQXkzGVen2gWJoMbU+H HUUwwgC5gQdMv/BfbJrV/XAmiZPvZv3XLyxPNivLMpqeqB9gXuGMRSQ+lgBxSk7pAl8A u6S+bYUZQmeAOC2wi1MBOBlYLmMFElAv9b+8mkEQuMT+feL+SyhoYSQdVIh+kfCat0I0 IahQ== X-Gm-Message-State: ALoCoQlXJ6nVU1TKgBYMDVkwJu5ecAulkXPmqcs+/GC6T3AfpzFBkR+GhlJO/plTwCfm2q4txvXU X-Received: by 10.66.184.133 with SMTP id eu5mr19655464pac.75.1436358571363; Wed, 08 Jul 2015 05:29:31 -0700 (PDT) Received: from localhost.localdomain ([202.62.93.138]) by smtp.gmail.com with ESMTPSA id db1sm2415741pdb.50.2015.07.08.05.29.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jul 2015 05:29:30 -0700 (PDT) From: Vaibhav Hiremath To: linux-arm-kernel@lists.infradead.org Subject: [PATCH-v6 1/6] mfd: 88pm800: remove duplicate dev_err calls during probe Date: Wed, 8 Jul 2015 17:56:27 +0530 Message-Id: <1436358392-15449-2-git-send-email-vaibhav.hiremath@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436358392-15449-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1436358392-15449-1-git-send-email-vaibhav.hiremath@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150708_052952_204122_D1D3D911 X-CRM114-Status: GOOD ( 14.22 ) X-Spam-Score: 0.7 (/) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: open list , Lee Jones , Vaibhav Hiremath , Samuel Ortiz MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SBL_CSS, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 During probe, inside fn device_800_init(), submodule init is happening and the same error message is getting printed in both the places, _init() and inside device_800_init(). So this patch gets rid of dev_err from _init() fns. Signed-off-by: Vaibhav Hiremath Acked-by: Lee Jones --- drivers/mfd/88pm800.c | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c index 841717a..0c5470e 100644 --- a/drivers/mfd/88pm800.c +++ b/drivers/mfd/88pm800.c @@ -308,59 +308,35 @@ static int device_gpadc_init(struct pm80x_chip *chip, return 0; out: - dev_info(chip->dev, "pm800 device_gpadc_init: Failed!\n"); return ret; } static int device_onkey_init(struct pm80x_chip *chip, struct pm80x_platform_data *pdata) { - int ret; - - ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0], + return mfd_add_devices(chip->dev, 0, &onkey_devs[0], ARRAY_SIZE(onkey_devs), &onkey_resources[0], 0, NULL); - if (ret) { - dev_err(chip->dev, "Failed to add onkey subdev\n"); - return ret; - } - - return 0; } static int device_rtc_init(struct pm80x_chip *chip, struct pm80x_platform_data *pdata) { - int ret; - if (pdata) { rtc_devs[0].platform_data = pdata->rtc; rtc_devs[0].pdata_size = pdata->rtc ? sizeof(struct pm80x_rtc_pdata) : 0; } - ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0], - ARRAY_SIZE(rtc_devs), NULL, 0, NULL); - if (ret) { - dev_err(chip->dev, "Failed to add rtc subdev\n"); - return ret; - } - return 0; + return mfd_add_devices(chip->dev, 0, &rtc_devs[0], + ARRAY_SIZE(rtc_devs), NULL, 0, NULL); } static int device_regulator_init(struct pm80x_chip *chip, struct pm80x_platform_data *pdata) { - int ret; - - ret = mfd_add_devices(chip->dev, 0, ®ulator_devs[0], + return mfd_add_devices(chip->dev, 0, ®ulator_devs[0], ARRAY_SIZE(regulator_devs), NULL, 0, NULL); - if (ret) { - dev_err(chip->dev, "Failed to add regulator subdev\n"); - return ret; - } - - return 0; } static int device_irq_init_800(struct pm80x_chip *chip)