From patchwork Mon Sep 17 07:23:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "AnilKumar, Chimata" X-Patchwork-Id: 1465641 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E6B92DFFFF for ; Mon, 17 Sep 2012 07:24:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753658Ab2IQHYX (ORCPT ); Mon, 17 Sep 2012 03:24:23 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:56605 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753523Ab2IQHYT (ORCPT ); Mon, 17 Sep 2012 03:24:19 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8H7Ntim031491; Mon, 17 Sep 2012 02:23:56 -0500 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8H7Nlm7012945; Mon, 17 Sep 2012 12:53:47 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Mon, 17 Sep 2012 12:53:46 +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 q8H7NbkO001966; Mon, 17 Sep 2012 12:53:46 +0530 From: AnilKumar Ch To: CC: , , , , , , , , , , , , AnilKumar Ch Subject: [PATCH v3 1/4] lis3: lis3lv02d: remove lis3lv02d driver DT init Date: Mon, 17 Sep 2012 12:53:19 +0530 Message-ID: <1347866602-2088-2-git-send-email-anilkumar@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1347866602-2088-1-git-send-email-anilkumar@ti.com> References: <1347866602-2088-1-git-send-email-anilkumar@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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;