From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH v2 1/2] mfd: tps65910: Fix crash in i2c_driver .probe Date: Tue, 18 Jun 2013 09:39:33 -0600 Message-ID: <51C07F35.8070805@wwwdotorg.org> References: <1371550481-28126-1-git-send-email-ttynkkynen@nvidia.com> <1371550481-28126-2-git-send-email-ttynkkynen@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1371550481-28126-2-git-send-email-ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Tuomas Tynkkynen Cc: Samuel Ortiz , Mark Brown , Wolfram Sang , linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linus Walleij List-Id: linux-tegra@vger.kernel.org On 06/18/2013 04:14 AM, Tuomas Tynkkynen wrote: > Commit "i2c: core: make it possible to match a pure device tree driver" > changed semantics of the i2c probing for device tree devices. > Device tree probed devices now get a NULL i2c_device_id pointer. > This caused kernel panics due to NULL dereference. > > Moves the of_match_device call from tps65910_parse_dt to .probe to > allow the chip type to be detected from device tree but with the > device parameters coming from platform data. Reviewed-by: Stephen Warren It's a pity that every driver that supports DT is going to need this boiler-plate though. Perhaps the I2C core can acquire a follow-on patch that does this for drivers in the future.