From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751363AbcBJMuc (ORCPT ); Wed, 10 Feb 2016 07:50:32 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:16960 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751062AbcBJMu2 (ORCPT ); Wed, 10 Feb 2016 07:50:28 -0500 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Wed, 10 Feb 2016 04:49:46 -0800 Message-ID: <56BB2F59.9030702@nvidia.com> Date: Wed, 10 Feb 2016 18:08:49 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Lee Jones , , Subject: Re: [PATCH] mfd: Provide MACRO to declare commonly defined MFD cell attributes References: <1455028027-1527-1-git-send-email-lee.jones@linaro.org> In-Reply-To: <1455028027-1527-1-git-send-email-lee.jones@linaro.org> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: DRUKMAIL102.nvidia.com (10.25.59.20) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 09 February 2016 07:57 PM, Lee Jones wrote: > Cc: Laxman Dewangan > Signed-off-by: Lee Jones > --- > include/linux/mfd/core.h | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > > diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h > index 27dac3f..dacdc49 100644 > --- a/include/linux/mfd/core.h > +++ b/include/linux/mfd/core.h > @@ -16,6 +16,38 @@ > > #include > > +#define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match) \ > + { \ > + .name = (_name), \ > + .num_resources = ARRAY_SIZE((_res)), \ > + .resources = (_res), \ > + .platform_data = (_pdata), \ > + .pdata_size = ARRAY_SIZE((_pdata)), \ > + .of_compatible = (_compat), \ > + .acpi_match = (_match), \ > + .id = _id, \ > + } > Should we add the _res_size and _pdata_size also in argument and use them instead of ARRA_SIZE and lets client set the size with help of ARRAY_SIZE based on type of data?