From patchwork Tue Sep 14 18:41:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 180142 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8EIfxb2009433 for ; Tue, 14 Sep 2010 18:41:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599Ab0INSl5 (ORCPT ); Tue, 14 Sep 2010 14:41:57 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:55064 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508Ab0INSl5 (ORCPT ); Tue, 14 Sep 2010 14:41:57 -0400 Received: by pxi10 with SMTP id 10so2529133pxi.19 for ; Tue, 14 Sep 2010 11:41:56 -0700 (PDT) Received: by 10.142.121.7 with SMTP id t7mr382129wfc.88.1284489716839; Tue, 14 Sep 2010 11:41:56 -0700 (PDT) Received: from localhost (c-24-18-179-55.hsd1.wa.comcast.net [24.18.179.55]) by mx.google.com with ESMTPS id q34sm554810wfc.19.2010.09.14.11.41.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 14 Sep 2010 11:41:55 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: paul@pwsan.com Subject: [PATCH v2 1/2] Revert "OMAP: omap_device: add omap_device_is_valid()" Date: Tue, 14 Sep 2010 11:41:53 -0700 Message-Id: <1284489714-14705-1-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.7.2.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 14 Sep 2010 18:42:00 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h index 25cd9ac..bad4c3d 100644 --- a/arch/arm/plat-omap/include/plat/omap_device.h +++ b/arch/arm/plat-omap/include/plat/omap_device.h @@ -62,7 +62,6 @@ * */ struct omap_device { - u32 magic; struct platform_device pdev; struct omap_hwmod **hwmods; struct omap_device_pm_latency *pm_lats; @@ -82,7 +81,6 @@ int omap_device_shutdown(struct platform_device *pdev); /* Core code interface */ -bool omap_device_is_valid(struct omap_device *od); int omap_device_count_resources(struct omap_device *od); int omap_device_fill_resources(struct omap_device *od, struct resource *res); diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index d2b1609..7f05f49 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -90,12 +90,6 @@ #define USE_WAKEUP_LAT 0 #define IGNORE_WAKEUP_LAT 1 -/* - * OMAP_DEVICE_MAGIC: used to determine whether a struct omap_device - * obtained via container_of() is in fact a struct omap_device - */ -#define OMAP_DEVICE_MAGIC 0xf00dcafe - /* Private functions */ /** @@ -414,8 +408,6 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, od->pm_lats = pm_lats; od->pm_lats_cnt = pm_lats_cnt; - od->magic = OMAP_DEVICE_MAGIC; - if (is_early_device) ret = omap_early_device_register(od); else @@ -627,18 +619,6 @@ int omap_device_align_pm_lat(struct platform_device *pdev, } /** - * omap_device_is_valid - Check if pointer is a valid omap_device - * @od: struct omap_device * - * - * Return whether struct omap_device pointer @od points to a valid - * omap_device. - */ -bool omap_device_is_valid(struct omap_device *od) -{ - return (od && od->magic == OMAP_DEVICE_MAGIC); -} - -/** * omap_device_get_pwrdm - return the powerdomain * associated with @od * @od: struct omap_device * *