From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH v4 2/4] OMAP4: Keyboard device registration Date: Thu, 17 Jun 2010 14:08:18 -0700 Message-ID: <87mxutl64d.fsf@deeprootsystems.com> References: <1276704555-30625-1-git-send-email-x0066660@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pv0-f174.google.com ([74.125.83.174]:46091 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757100Ab0FQVIW (ORCPT ); Thu, 17 Jun 2010 17:08:22 -0400 In-Reply-To: (Charulatha Varadarajan's message of "Thu\, 17 Jun 2010 11\:37\:09 +0530") Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: "Varadarajan, Charulatha" Cc: "Arce, Abraham" , "linux-input@vger.kernel.org" , "linux-omap@vger.kernel.org" "Varadarajan, Charulatha" writes: [...] >> + >> +int omap4_init_kp(struct omap4_keypad_platform_data *kp) >> +{ >> + struct omap_hwmod *oh; >> + struct omap_device *od; >> + struct omap4_keypad_platform_data *pdata; >> + >> + unsigned int id = 0; >> + char *name = "omap4-keypad"; >> + char *oh_name = "kbd"; >> + >> + if (!cpu_is_omap44xx()) >> + return -ENODEV; >> + >> + oh = omap_hwmod_lookup(oh_name); > > Use omap_hwmod_for_each_by_class() instead of lookup by name. Yes. >> + if (!oh) { >> + pr_err("Could not look up %s\n", oh_name); >> + return -EIO; >> + } >> + >> + pdata = kp; >> + >> + pdata->base = oh->_rt_va; >> + pdata->irq = oh->mpu_irqs[0].irq; > > Use platform_get_() APIs to get base addr & irq instead of passing > it as pdata Yes. Thanks Charu! For all those working on OMAP hwmod conversions, please take some time to read the reviews of the other hwmod conversions that have already been posted and reviewed (some of them multiple times) so we don't keep duplicating the same mistakes and wasting review time. Thanks, Kevin