From patchwork Fri Oct 18 12:56:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 176824 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp820730ill; Fri, 18 Oct 2019 05:56:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFz1Ln/jxnI68kn+1LXCL6ymQwHxonO9xz8hmQEfU8K8+BBm5tbSt3GHQtODWMP459u4g8 X-Received: by 2002:a17:906:6094:: with SMTP id t20mr8554042ejj.316.1571403377845; Fri, 18 Oct 2019 05:56:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571403377; cv=none; d=google.com; s=arc-20160816; b=ZNcGHQJKuUUIg2kRTKrEhb1XQoKYbDMTRUZd8prS7xK32utlUvpcIp/UszJRtrFS3l N5Bs/L0GyvZWhIy/tcbDczo3XFXMQnnPB0ucX4rU+WILM2RtTFElTaiQiSyuyNMg/Iuu ypMRwlMtgDEoRAgbj1Mbu55QELOg26it5hNDK121r38poX6ewwlvkBaZ9lUCcgWpb7TP cCcp2uxLo56Leyv8Ypcrs7Mi6EfR4w7sygqdLOMMDI5Ov9gLBSG9SpPjsErWj0klSjHE 8cZHcs9BEIvrWUV0Gc8s9e2SaDvWj2LZPWZXhHqtXMWP+/OAq7KqYD75CuVQ4GhUcOZQ nxNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=RI1bFjYRN5JoMtaeqs26PN1sSu7fROvvqss/8HZl7T4=; b=vcUNq+lIW9M/CcZSu/H5Mz4+uqHVozNgrhd+5cVM/mBLxkYz78AtMOFM7+S7QmmyZo DC5FDgdHpfDspM4GgYxvLFzI3dyH5o/hWW4A0w1XF1jwu6uTdK62ho5vOgCs1t8K0Cf8 f9f34/RIUqGCH2Oda0Z+8ZjmsSw8grg7FSk1PexWBcOWihbZ+ZuPvdfavCCOQWWQSsoM WMi6Md/cz9aBVbn4DTtpK90TS5o+IfSc7GBkFuPeNjvRJTdS8Z/6ALJqHFU0BtGljb4w xFOiXONVYRl4AEHVV9ebZSMYrzp4ePsj+nVkh6k38ulUZx8ikoiHEVVXrghrIwgXh9OJ 9c7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Tkump4dk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j47si3670642ede.117.2019.10.18.05.56.17; Fri, 18 Oct 2019 05:56:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Tkump4dk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410146AbfJRM4O (ORCPT + 26 others); Fri, 18 Oct 2019 08:56:14 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40985 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408410AbfJRM4O (ORCPT ); Fri, 18 Oct 2019 08:56:14 -0400 Received: by mail-wr1-f68.google.com with SMTP id p4so6151502wrm.8 for ; Fri, 18 Oct 2019 05:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RI1bFjYRN5JoMtaeqs26PN1sSu7fROvvqss/8HZl7T4=; b=Tkump4dkVHciY3EeN1den7fHXElV+9LPol0+LGG3Z7MWtrr7yGuf5RVZ41hMkz6dL7 pQDq79k4nyRfYaA1srfAPUUjnTfnixSxG/3HVivTenEJ1j+axHw4aH9c3ZleE1gp7cQf DrZWH2k2B12+nwMszZ5/5W7wHgoITM5o+D8IVlOdJrE7lFGvHcjP31AoaUprRjTU3XyB t7sm2PpXhN4LLXJPIYLbVz7vh7qVTByPvW24Iid7J8l6L+YZ5OEVulRWRaIcWLQVxj/Y yLvz2i2tfSl6U88FWJPSqnspRFwayraj9hJakM3sJQFRaBIAjORWXkWMfgOnq6qUtDqQ 3ErA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RI1bFjYRN5JoMtaeqs26PN1sSu7fROvvqss/8HZl7T4=; b=tpwp0YEJT8+j0FDTDIuYShLbVeOL+VUVLjoLgx/UsHahEeJpNXP9sBXOernxIHRkED ENH0Z6Vw6rURljO8WrMJEgIc6a8eWtQRuWxeUcLY3AzgceyEb4Qku/zT9igKgBGfeEli MUHavXuNARzR+GL2AL8v+A2QPMWaafsmWrxroVuI9gJ56UZIPlUxa30krgeOotdnG5Yc ZBJYSobqh7OVtRSEUEvOu5hSxaer0UebD1V1MvRs5a3pJV6b92/HkyfcE3ixDbAkF4+4 7RC6e0en8/8iVrULNaiP4euHRguvcA7HUa2zAs6v3Icqkj+mrV5lcN4xe5AD7A9vL7bq PVMA== X-Gm-Message-State: APjAAAUZ1WWRipBawG1h7WD9LcH6HjckrYKTbxyEojN7lRSqstHZnK/c X5+c4qkf4iS7Q5ZZnfZZ+hSq8Q== X-Received: by 2002:adf:e292:: with SMTP id v18mr7628000wri.190.1571403371768; Fri, 18 Oct 2019 05:56:11 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.47]) by smtp.gmail.com with ESMTPSA id q14sm6058491wre.27.2019.10.18.05.56.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 05:56:11 -0700 (PDT) From: Lee Jones To: broonie@kernel.org, linus.walleij@linaro.org, daniel.thompson@linaro.org, arnd@arndb.de Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dilinger@queued.net, Lee Jones Subject: [PATCH 1/4] mfd: cs5535-mfd: Use PLATFORM_DEVID_* defines and tidy error message Date: Fri, 18 Oct 2019 13:56:05 +0100 Message-Id: <20191018125608.5362-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191018125608.5362-1-lee.jones@linaro.org> References: <20191018125608.5362-1-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In most contexts '-1' doesn't really mean much to the casual observer. In almost all cases, it's better to use a human readable define. In this case PLATFORM_DEVID_* defines have already been provided for this purpose. While we're here, let's be specific about the 'MFD devices' which failed. It will help when trying to distinguish with of the 2 sets of sub-devices we actually failed to register. Signed-off-by: Lee Jones --- drivers/mfd/cs5535-mfd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c index f1825c0ccbd0..2c47afc22d24 100644 --- a/drivers/mfd/cs5535-mfd.c +++ b/drivers/mfd/cs5535-mfd.c @@ -127,10 +127,11 @@ static int cs5535_mfd_probe(struct pci_dev *pdev, cs5535_mfd_cells[i].id = 0; } - err = mfd_add_devices(&pdev->dev, -1, cs5535_mfd_cells, + err = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, cs5535_mfd_cells, ARRAY_SIZE(cs5535_mfd_cells), NULL, 0, NULL); if (err) { - dev_err(&pdev->dev, "MFD add devices failed: %d\n", err); + dev_err(&pdev->dev, + "Failed to add CS5532 sub-devices: %d\n", err); goto err_disable; }