From patchwork Tue Feb 24 09:37:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 5870891 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 62CB2BF440 for ; Tue, 24 Feb 2015 09:37:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB7A020652 for ; Tue, 24 Feb 2015 09:37:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC9AD20649 for ; Tue, 24 Feb 2015 09:37:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752545AbbBXJhS (ORCPT ); Tue, 24 Feb 2015 04:37:18 -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 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 242CAADB9; Tue, 24 Feb 2015 09:37:15 +0000 (UTC) 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 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-by: Nikolaus Schaller --- Hi Tomi, I wonder if you would consider this for the next merge window (or maybe even sooner as a bug-fix). I haven't tested it with an i2c display, but it certainly allows xorg to work 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 +#if IS_ENABLED(CONFIG_I2C) +#include +#else +static inline int i2c_verify_client(struct device *dev) +{ + return NULL; +} +#endif + #include