Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752964AbaDWIwu (ORCPT ); Wed, 23 Apr 2014 04:52:50 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:37802 "EHLO mail-oa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbaDWIwr (ORCPT ); Wed, 23 Apr 2014 04:52:47 -0400 MIME-Version: 1.0 In-Reply-To: <20140417104409.GL28725@lee--X1> References: <1397659455-13638-1-git-send-email-linus.walleij@linaro.org> <1397659455-13638-4-git-send-email-linus.walleij@linaro.org> <20140417104409.GL28725@lee--X1> Date: Wed, 23 Apr 2014 10:52:47 +0200 Message-ID: Subject: Re: [PATCH 3/6] mfd: stmpe: prope properly from the device tree From: Linus Walleij To: Lee Jones Cc: Samuel Ortiz , "linux-kernel@vger.kernel.org" , Silvio F , Philipp Zabel , Sascha Hauer , Shawn Guo , Viresh Kumar , Shiraz Hashim , spear-devel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 17, 2014 at 12:44 PM, Lee Jones wrote: >> +#ifdef CONFIG_OF > > Didn't you say that the only platform using this device is DT only? So > why don't we make the driver depend on OF and get rid of this ugly > #ifdeffery? OK fixing. >> + { >> + .compatible = "st,stmpe2403", >> + .data = (void *)STMPE2403, >> + }, >> + {}, >> +}; > > If none of these stray over 80 chars, I think I'd like to see > of_device_id tables as single line entries OK. >> + if (partnum < 0) >> + partnum = id->driver_data; > > Should this be able to fail and for us to still carry on? Actually yes, to stay compatible with elder device trees that use the trick to just have the node name correspond to the I2C ID instead of using compatible, this needs to be preserved. But I'll add a small nag print about it. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/