Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729AbbBXJhU (ORCPT ); Tue, 24 Feb 2015 04:37:20 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52291 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751627AbbBXJhQ (ORCPT ); Tue, 24 Feb 2015 04:37:16 -0500 Date: Tue, 24 Feb 2015 20:37:06 +1100 From: NeilBrown To: Tomi Valkeinen Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, GTA04 owners , "Dr. H. Nikolaus Schaller" Subject: [PATCH] OMAPDSS: restore "name" sysfs entry. Message-ID: <20150224203706.1eafa129@notabene.brown> X-Mailer: Claws Mail 3.10.1-162-g4d0ed6 (GTK+ 2.24.25; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/44/CbQokPf2ZVpXE4fgAtdK"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3817 Lines: 119 --Sig_/44/CbQokPf2ZVpXE4fgAtdK Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable commit 303e4697e762dc92a40405f4e4b8aac02cd0d70b OMAPDSS: rename display-sysfs 'name' entry broke the xorg X server on my device as it couldn't find the display any more. It needs the 'name' file and now there isn't one. That commit claims that 'name' is not compatible with i2c or spi. i2c does register it own 'name' file, but spi does not, hence my problem - I have an spi display. So create a special case for i2c: add the name attribute for non-i2c devices. Fixes: 303e4697e762dc92a40405f4e4b8aac02cd0d70b Signed-off-by: NeilBrown -- Hi Tomi, I wonder if you would consider this for the next merge window (or maybe ev= en sooner as a bug-fix). I haven't tested it with an i2c display, but it certainly allows xorg to wo= rk on my spi-attached display. Thanks, NeilBrown diff --git a/drivers/video/fbdev/omap2/dss/display-sysfs.c b/drivers/video/= fbdev/omap2/dss/display-sysfs.c index 5a2095a98ed8..53897b743130 100644 --- a/drivers/video/fbdev/omap2/dss/display-sysfs.c +++ b/drivers/video/fbdev/omap2/dss/display-sysfs.c @@ -25,6 +25,15 @@ #include #include =20 +#if IS_ENABLED(CONFIG_I2C) +#include +#else +static inline int i2c_verify_client(struct device *dev) +{ + return NULL; +} +#endif + #include