From patchwork Fri Jul 6 04:56:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinya Kuribayashi X-Patchwork-Id: 1162801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id D8D0F3FC33 for ; Fri, 6 Jul 2012 05:00:00 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sn0bK-0006WM-9B; Fri, 06 Jul 2012 04:57:06 +0000 Received: from relmlor2.renesas.com ([210.160.252.172]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sn0bE-0006Vk-Nz for linux-arm-kernel@lists.infradead.org; Fri, 06 Jul 2012 04:57:02 +0000 Received: from relmlir4.idc.renesas.com ([10.200.68.154]) by relmlor2.idc.renesas.com ( SJSMS) with ESMTP id <0M6Q00GS532U2IC0@relmlor2.idc.renesas.com> for linux-arm-kernel@lists.infradead.org; Fri, 06 Jul 2012 13:56:54 +0900 (JST) Received: from relmlac3.idc.renesas.com ([10.200.69.23]) by relmlir4.idc.renesas.com ( SJSMS) with ESMTP id <0M6Q00FJ632U9QB0@relmlir4.idc.renesas.com> for linux-arm-kernel@lists.infradead.org; Fri, 06 Jul 2012 13:56:54 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id DF94918098; Fri, 06 Jul 2012 13:56:53 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id D93311809C; Fri, 06 Jul 2012 13:56:53 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id PAT16761; Fri, 06 Jul 2012 13:56:53 +0900 X-IronPort-AV: E=Sophos; i="4.77,536,1336316400"; d="scan'208"; a="89268420" Received: from unknown (HELO [10.161.69.127]) ([10.161.69.127]) by relmlii2.idc.renesas.com with ESMTP; Fri, 06 Jul 2012 13:56:53 +0900 Message-id: <4FF67016.1000806@renesas.com> Date: Fri, 06 Jul 2012 13:56:54 +0900 From: Shinya Kuribayashi User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-version: 1.0 To: ohad@wizery.com Subject: [PATCH 3/3] hwspinlock/core: allow hwspinlock_device to have bank-specific private data References: <4FF66FBD.5090601@renesas.com> In-reply-to: <4FF66FBD.5090601@renesas.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It would be useful, for example, to save ioremap()ed 'io_base' address, when a platform-specific driver uses 'priv' in 'struct hwspinlock' for something different. Signed-off-by: Shinya Kuribayashi --- drivers/hwspinlock/hwspinlock_internal.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/hwspinlock/hwspinlock_internal.h b/drivers/hwspinlock/hwspinlock_internal.h index c60318c..dc7e522 100644 --- a/drivers/hwspinlock/hwspinlock_internal.h +++ b/drivers/hwspinlock/hwspinlock_internal.h @@ -57,6 +57,9 @@ struct hwspinlock { * @ops: platform-specific hwspinlock handlers * @base_id: id index of the first lock in this device * @num_locks: number of locks in this device + * @bank_data: private data which can be shared across 'struct hwspinlock' + * instances in this device, owned by the underlying platform- + * specific hwspinlock driver * @lock: dynamically allocated array of 'struct hwspinlock' (must be placed * at the end of the hwspinlock_device) */ @@ -65,6 +68,7 @@ struct hwspinlock_device { const struct hwspinlock_ops *ops; int base_id; int num_locks; + void *bank_data; struct hwspinlock lock[0]; };