Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4202866ybg; Mon, 21 Oct 2019 05:30:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNmcVNAXUSwgteGs0MhnIC/kK5YunMt4lSqJh4ooPWD2IBbbgVNJZsV6zInacIpG1c/IQ/ X-Received: by 2002:aa7:ca59:: with SMTP id j25mr24714507edt.78.1571661025187; Mon, 21 Oct 2019 05:30:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571661025; cv=none; d=google.com; s=arc-20160816; b=EELJ3M2BcritPb67enImHBJWv7K7eD7uwPGee3MrsG6ylvMQGd7KqOvbBqhaqNXcrC rRrSCmO0fDhtSud36q30gnMZuYaNB5uCdRs5PsMCDDbIJmSAzBho7EXIrQsDN8VvYxf2 onspB0gzdVF3keeh3VQHz2zva0jEM64VtXNYPn19eX850VS8vNWUsP4hpMpU50t/9gOZ Wg5jTS9GBU63z8T+HzSz2cl9VdjNx2u41TrOFZb/nD48Vt/lykAUtdexG9L6EIV8ZYOO TYW+nPoe2H73YBexWg+H10ejjN4MfEjT4LfVLlrA5NEBvTVpcg5PXVABjtAkg3dQNlnT ARRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0Bp8/Rt3sh+Dp54MmRulppkSlI3E35h5lLEu1NL/66s=; b=Bcc5AiE8ZQrdWr/xQHyTcoxTY2XMHnAR9QeY0ejo7T/dqO00fzl1D1viEQ5TemlQnb xj4jRWcjb3zZSidj8ZOg9dGv2b6HAspXuD4U1jYqSYGsFYtfn7hhY+J49dZcLuTb9vW8 uIl1/4JNOv+qF5rGYOSl13MVCGnB3nWxr3IC01fnSZm5saUxyBu0wRnnBMuihvnyA072 tP59HK/phhnqWLx0oqz9oMT8mHMyKak/t1w75czBhpiUZiHg+5s7P1tzs475j3N42K6w I/+rM0RQnf4Jgv6qGRhaCRnOJOMuH3Qsz2jDzLh9hjB0Umfik1HPUXhJH6+olaScjz8Z PeWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fg+EZ8rR; 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 oe23si8357928ejb.199.2019.10.21.05.30.02; Mon, 21 Oct 2019 05:30:25 -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=fg+EZ8rR; 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 S1728551AbfJUM33 (ORCPT + 99 others); Mon, 21 Oct 2019 08:29:29 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36605 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727344AbfJUM32 (ORCPT ); Mon, 21 Oct 2019 08:29:28 -0400 Received: by mail-wm1-f68.google.com with SMTP id c22so3483589wmd.1 for ; Mon, 21 Oct 2019 05:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0Bp8/Rt3sh+Dp54MmRulppkSlI3E35h5lLEu1NL/66s=; b=fg+EZ8rR6zQ3vBZkhEVTMSJIkRWVW81aPPY4whM0f85iUyAYYOdFB/Zlwa2IAdEeCe ab0iT+Taos9nYLyyrI3j3p3A269hUMedsQAmi/WkWVNLNbF+ovtsmMOFJdM7oPG0kX44 HoLGCvc36n6D1UzBl1e4+EVcvtdF82Kic5pDSs7TKv+UWhax298piQMnJAKjdhPSNpNt u1yVwqWGzJxwNRSARVsdpIihgIJd6biiBL0XhfgL0Q6ofRhTIRPEt34P7v1GrImyAAPD IHEx0dd7OIBt7XB3pH05mvDopQ1vK3+bFG1NQr7+IO2/IUFlfHjo7NcDyJ1pkgSz+NDN RZ+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0Bp8/Rt3sh+Dp54MmRulppkSlI3E35h5lLEu1NL/66s=; b=intc61kzUSlPHwLNEFPOqBzKV1FxR0AN57iCdzBh909r0D504N62TmDAeg3Isq0NWx Y6hRJ3nj8Ur8BE62e5SAVomIMe5TZnttvA3r3ydPYRE5BXNJADqaBdKmrCSw5lHTjj6n jjiIdLDb9r4rb8YQUDT7fawy/4tSO5LHbZL4ZWfJe1jRhxLQSih2oN698d4RI30BFCFI xRnxw4D6SQ4h3zXdwjxTzTBCLskJvliXTujg8XhneoPOK2tadF8MWA1nnPlfIjdPfa+k wUrIwzHxKCR2veJQfgh8EO0ORS9gTWV9mcu+QtKJgjNzUcIVUckS5oRSy1w7Qzn8Iuo2 hz3w== X-Gm-Message-State: APjAAAWTrHtMlxhdM7fuDWtJJD29JVMFilwPti/tk8E9AEYPjkLz7wu0 WVmEtZeRoqEBfopKj3ZfkHosuw== X-Received: by 2002:a1c:9894:: with SMTP id a142mr18467038wme.70.1571660966800; Mon, 21 Oct 2019 05:29:26 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id p20sm9987618wmc.23.2019.10.21.05.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 05:29:26 -0700 (PDT) Date: Mon, 21 Oct 2019 13:29:24 +0100 From: Daniel Thompson To: Lee Jones Cc: arnd@arndb.de, broonie@kernel.org, linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, baohua@kernel.org, stephan@gerhold.net Subject: Re: [PATCH v2 4/9] mfd: cs5535-mfd: Register clients using their own dedicated MFD cell entries Message-ID: <20191021122924.qmaio5oe5j66tfdj@holly.lan> References: <20191021105822.20271-1-lee.jones@linaro.org> <20191021105822.20271-5-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191021105822.20271-5-lee.jones@linaro.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 21, 2019 at 11:58:17AM +0100, Lee Jones wrote: > CS5535 is the only user of mfd_clone_cell(). It makes more sense to > register child devices in the traditional way and remove the quite > bespoke mfd_clone_cell() call from the MFD API. > > Signed-off-by: Lee Jones > --- > drivers/mfd/cs5535-mfd.c | 24 ++++++++++++++++++------ > 1 file changed, 18 insertions(+), 6 deletions(-) > > diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c > index 053e33447808..96a99ac13384 100644 > --- a/drivers/mfd/cs5535-mfd.c > +++ b/drivers/mfd/cs5535-mfd.c > @@ -57,9 +57,17 @@ static struct mfd_cell cs5535_mfd_cells[] = { > }, > }; > > -static const char *olpc_acpi_clones[] = { > - "olpc-xo1-pm-acpi", > - "olpc-xo1-sci-acpi" > +static struct mfd_cell cs5535_olpc_mfd_cells[] = { > + { > + .name = "olpc-xo1-pm-acpi", > + .num_resources = 1, > + .resources = &cs5535_mfd_resources[ACPI_BAR], > + }, > + { > + .name = "olpc-xo1-sci-acpi", > + .num_resources = 1, > + .resources = &cs5535_mfd_resources[ACPI_BAR], > + }, Is the cs5535-acpi cell actually used by anything? I think it was only ever used as a template and can be removed; I didn't spot any driver that uses it. PS If the cell were removed then my review comment on the previous patch becomes moot ;-) > }; > > static int cs5535_mfd_probe(struct pci_dev *pdev, > @@ -105,10 +113,14 @@ static int cs5535_mfd_probe(struct pci_dev *pdev, > goto err_remove_devices; > } > > - err = mfd_clone_cell("cs5535-acpi", olpc_acpi_clones, > - ARRAY_SIZE(olpc_acpi_clones)); > + err = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, > + cs5535_olpc_mfd_cells, > + ARRAY_SIZE(cs5535_olpc_mfd_cells), > + NULL, 0, NULL); > if (err) { > - dev_err(&pdev->dev, "Failed to clone MFD cell\n"); > + dev_err(&pdev->dev, > + "Failed to add CS5532 OLPC sub-devices: %d\n", > + err); > goto err_release_acpi; > } > } > -- > 2.17.1 >