From patchwork Wed Oct 8 08:46:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5052221 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EBC4BC11AB for ; Wed, 8 Oct 2014 08:47:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B510201F2 for ; Wed, 8 Oct 2014 08:47:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44F5D2018E for ; Wed, 8 Oct 2014 08:47:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755006AbaJHIrI (ORCPT ); Wed, 8 Oct 2014 04:47:08 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:30793 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754995AbaJHIrG (ORCPT ); Wed, 8 Oct 2014 04:47:06 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0ND4004JLB2H7RC0@mailout2.samsung.com> for linux-media@vger.kernel.org; Wed, 08 Oct 2014 17:47:05 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-49-5434fa08b426 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id ED.32.20081.80AF4345; Wed, 08 Oct 2014 17:47:04 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0ND400IRIB275M60@mmp1.samsung.com>; Wed, 08 Oct 2014 17:47:04 +0900 (KST) From: Jacek Anaszewski To: linux-media@vger.kernel.org, kyungmin.park@samsung.com Cc: s.nawrocki@samsung.com Subject: [PATCH 1/3] async: Add async_domain_init_exclusive() helper Date: Wed, 08 Oct 2014 10:46:51 +0200 Message-id: <1412758013-23608-1-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOJMWRmVeSWpSXmKPExsVy+t9jAV2OXyYhBm0PDCzONr1ht+jZsJXV 4vCbdlYHZo++LasYPT5vkgtgiuKySUnNySxLLdK3S+DKWDXJseAye8X0uxeZGxg3sHUxcnJI CJhI7F9+iAnCFpO4cG89UJyLQ0hgEaPEhX1TWSCcdiaJtp1X2EGq2AQMJX6+eA3WISJgJbFh +ytWEJtZQEri+sbVYDXCAi4SHf/fgMVZBFQlnp07zgxi8wp4SFw9uQ0ozgG0TUFiziSbCYzc CxgZVjGKphYkFxQnpeca6hUn5haX5qXrJefnbmIEe/eZ1A7GlQ0WhxgFOBiVeHgNmk1ChFgT y4orcw8xSnAwK4nwSp4ACvGmJFZWpRblxxeV5qQWH2KU5mBREuc90GodKCSQnliSmp2aWpBa BJNl4uCUamC0C3B8I+r6fJXHXLm4Ptm07i0eE9jqmL/ZrbXob7CV9zhm4zv/Xmfg5hcm84oe RzIyuCuk+DEtXO40+01d1fFmjUnnNgS0chfMEPz5nXf1qZdBe+svHblb0ebFVP52TXBjxvfJ j7nCLq1JsD62UHTJSsPCm+/SnjpxOv9XqAu6vUrsSFddRZ4SS3FGoqEWc1FxIgCmFabk6gEA AA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Sylwester Nawrocki Add a helper to allow initialization of struct async_domain at runtime. Signed-off-by: Sylwester Nawrocki Acked-by: Kyungmin Park --- include/linux/async.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/async.h b/include/linux/async.h index 6b0226b..807e40b 100644 --- a/include/linux/async.h +++ b/include/linux/async.h @@ -37,6 +37,12 @@ struct async_domain { struct async_domain _name = { .pending = LIST_HEAD_INIT(_name.pending), \ .registered = 0 } +static inline void async_domain_init_exclusive(struct async_domain *domain) +{ + INIT_LIST_HEAD(&domain->pending); + domain->registered = 0; +} + extern async_cookie_t async_schedule(async_func_t func, void *data); extern async_cookie_t async_schedule_domain(async_func_t func, void *data, struct async_domain *domain);