From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Hovold Subject: Re: [PATCH v2 5/5] ARM: OMAP2+: Create dummy platform_device for pm33xx Date: Mon, 3 Jul 2017 18:58:44 +0200 Message-ID: <20170703165844.GD27842@localhost> References: <20170519200438.9502-1-d-gerlach@ti.com> <20170519200438.9502-6-d-gerlach@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20170519200438.9502-6-d-gerlach@ti.com> Sender: linux-kernel-owner@vger.kernel.org To: Dave Gerlach Cc: Tony Lindgren , Santosh Shilimkar , Russell King , Keerthy J , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: linux-omap@vger.kernel.org On Fri, May 19, 2017 at 03:04:38PM -0500, Dave Gerlach wrote: > Add amx3_common_pm_init to create a dummy platform_device for > pm33xx so that our pm33xx module can probe and am335x and am437x > platforms to enable basic suspend to mem and standby support. > > Signed-off-by: Dave Gerlach > --- > +void __init amx3_common_pm_init(void) > +{ > + struct platform_device_info devinfo = { }; You should make sure devinfo is zeroed, and also set .id to -1. > + struct am33xx_pm_platform_data *pdata; > + > + pdata = am33xx_pm_get_pdata(); > + devinfo.name = "pm33xx"; > + devinfo.data = pdata; > + devinfo.size_data = sizeof(*pdata); > + platform_device_register_full(&devinfo); > +} Johan