From patchwork Fri Sep 14 08:06:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "AnilKumar, Chimata" X-Patchwork-Id: 1456181 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (unknown [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id BBF87DF280 for ; Fri, 14 Sep 2012 08:20:24 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TCQw5-0001Tg-Fh; Fri, 14 Sep 2012 08:07:37 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TCQw0-0001Rh-5v for linux-arm-kernel@lists.infradead.org; Fri, 14 Sep 2012 08:07:33 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8E87HVK020993; Fri, 14 Sep 2012 03:07:18 -0500 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8E877wY029086; Fri, 14 Sep 2012 13:37:17 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Fri, 14 Sep 2012 13:37:08 +0530 Received: from localhost.localdomain (dbdp20.itg.ti.com [172.24.170.38]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8E86wqo029957; Fri, 14 Sep 2012 13:37:07 +0530 From: AnilKumar Ch To: Subject: [PATCH v2 1/4] lis3: lis3lv02d: remove lis3lv02d driver DT init Date: Fri, 14 Sep 2012 13:36:53 +0530 Message-ID: <1347610016-10123-2-git-send-email-anilkumar@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1347610016-10123-1-git-send-email-anilkumar@ti.com> References: <1347610016-10123-1-git-send-email-anilkumar@ti.com> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.4 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.94.94.40 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.5 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: dmitry.torokhov@gmail.com, eric.piel@tremplin-utc.net, tony@atomide.com, gregkh@linuxfoundation.org, devicetree-discuss@lists.ozlabs.org, broonie@opensource.wolfsonmicro.com, grant.likely@secretlab.ca, jic23@cam.ac.uk, AnilKumar Ch , greg@kroah.com, akpm@linux-foundation.org, linux-omap@vger.kernel.org, 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 Remove lis3lv02d driver device tree initialization from core driver and move it to individual drivers. With the current implementation some pdata parameters are missing if we use lis3lv02d_init_device() in lis3lv02d_i2c driver. Signed-off-by: AnilKumar Ch --- drivers/misc/lis3lv02d/lis3lv02d.c | 8 ++------ drivers/misc/lis3lv02d/lis3lv02d.h | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index 79349ec..026021e 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c @@ -944,7 +944,7 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *lis3, } #ifdef CONFIG_OF -static int lis3lv02d_init_dt(struct lis3lv02d *lis3) +int lis3lv02d_init_dt(struct lis3lv02d *lis3) { struct lis3lv02d_platform_data *pdata; struct device_node *np = lis3->of_node; @@ -1084,7 +1084,7 @@ static int lis3lv02d_init_dt(struct lis3lv02d *lis3) } #else -static int lis3lv02d_init_dt(struct lis3lv02d *lis3) +int lis3lv02d_init_dt(struct lis3lv02d *lis3) { return 0; } @@ -1100,10 +1100,6 @@ int lis3lv02d_init_device(struct lis3lv02d *lis3) irq_handler_t thread_fn; int irq_flags = 0; - err = lis3lv02d_init_dt(lis3); - if (err < 0) - return err; - lis3->whoami = lis3lv02d_read_8(lis3, WHO_AM_I); switch (lis3->whoami) { diff --git a/drivers/misc/lis3lv02d/lis3lv02d.h b/drivers/misc/lis3lv02d/lis3lv02d.h index 4cf0779..b5505fa 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.h +++ b/drivers/misc/lis3lv02d/lis3lv02d.h @@ -326,5 +326,6 @@ void lis3lv02d_joystick_disable(struct lis3lv02d *lis3); void lis3lv02d_poweroff(struct lis3lv02d *lis3); int lis3lv02d_poweron(struct lis3lv02d *lis3); int lis3lv02d_remove_fs(struct lis3lv02d *lis3); +int lis3lv02d_init_dt(struct lis3lv02d *lis3); extern struct lis3lv02d lis3_dev;