Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755610Ab1CXMPR (ORCPT ); Thu, 24 Mar 2011 08:15:17 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:54150 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751774Ab1CXMPP convert rfc822-to-8bit (ORCPT ); Thu, 24 Mar 2011 08:15:15 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=MxBW2EeeD1TxMIERTzu/KjXL/7xVG2KIDs6e1a+ASFi/YHvjcAfN1hhB51/LySRCuZ pzfFFOEG9joq4UL6MebaiwGHEfhFKM0yI/d7aBEClYRWz1CD2EIop8PWz2ksfr0YPNK0 ydRVYhzU5r4kGNBCKRxweDNK1UM5+8GiUr9F8= MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 24 Mar 2011 13:15:14 +0100 Message-ID: Subject: Re: Commit 9661e92c10a9775243c1ecb73373528ed8725a10: sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/device' From: Alessandro Suardi To: Jeff Chua Cc: Linux Kernel , Matthew Garrett , Richard Purdie , Chris Wilson , David Airlie , Alex Deucher , Ben Skeggs , Zhang Rui , Len Brown , Jesse Barnes , Sedat Dilek , Andrew Morton , Linus Torvalds Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5727 Lines: 144 On Thu, Mar 24, 2011 at 1:10 PM, Jeff Chua wrote: > > > Commit 9661e92c10a9775243c1ecb73373528ed8725a10 causes this bug. Reverting > it solves the problem. > > Notebook is Lenovo X201s. > > Thanks, > Jeff > > > > ------------[ cut here ]------------ > WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x8c/0x9e() > Hardware name: 5413FGA > sysfs: cannot create duplicate filename > '/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/device' > Modules linked in: i915(+) drm_kms_helper > Pid: 2010, comm: modprobe Not tainted 2.6.38 #15 > Call Trace: > [] ? warn_slowpath_common+0x78/0x8c > [] ? warn_slowpath_fmt+0x45/0x4a > [] ? sysfs_add_one+0x8c/0x9e > [] ? sysfs_do_create_link+0x100/0x1a7 > [] ? acpi_video_device_lcd_get_level_current+0x47/0x10e > [] ? acpi_video_bus_add+0x961/0xc5b > [] ? sysfs_addrm_finish+0x29/0xc2 > [] ? acpi_device_probe+0x42/0x10d > [] ? driver_probe_device+0xa8/0x138 > [] ? __driver_attach+0x4f/0x6f > [] ? __driver_attach+0x0/0x6f > [] ? bus_for_each_dev+0x44/0x78 > [] ? bus_add_driver+0xb9/0x201 > [] ? driver_register+0x90/0xf8 > [] ? acpi_video_register+0x1b/0x34 > [] ? i915_driver_load+0xcb9/0xd99 [i915] > [] ? drm_get_minor+0x209/0x25b > [] ? drm_get_pci_dev+0x14f/0x259 > [] ? local_pci_probe+0x49/0x93 > [] ? pci_device_probe+0xbf/0xec > [] ? driver_sysfs_add+0x66/0x8d > [] ? driver_probe_device+0xa8/0x138 > [] ? __driver_attach+0x4f/0x6f > [] ? __driver_attach+0x0/0x6f > [] ? bus_for_each_dev+0x44/0x78 > [] ? bus_add_driver+0xb9/0x201 > [] ? driver_register+0x90/0xf8 > [] ? __pci_register_driver+0x4e/0xc0 > [] ? i915_init+0x0/0x8d [i915] > [] ? i915_init+0x0/0x8d [i915] > [] ? do_one_initcall+0x78/0x131 > [] ? sys_init_module+0x97/0x1d5 > [] ? system_call_fastpath+0x16/0x1b > ---[ end trace 7ad4522ea6dca630 ]--- > > > > commit 9661e92c10a9775243c1ecb73373528ed8725a10 > Author: Matthew Garrett > Date: ? Tue Mar 22 16:30:25 2011 -0700 > > ? ?acpi: tie ACPI backlight devices to PCI devices if possible > > ? ?Dual-GPU machines may provide more than one ACPI backlight interface. > ?Tie > ? ?the backlight device to the GPU in order to allow userspace to identify > ? ?the correct interface. > > ? ?Signed-off-by: Matthew Garrett > ? ?Cc: Richard Purdie > ? ?Cc: Chris Wilson > ? ?Cc: David Airlie > ? ?Cc: Alex Deucher > ? ?Cc: Ben Skeggs > ? ?Cc: Zhang Rui > ? ?Cc: Len Brown > ? ?Cc: Jesse Barnes > ? ?Tested-by: Sedat Dilek > ? ?Signed-off-by: Andrew Morton > ? ?Signed-off-by: Linus Torvalds > > diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c > index a9eec8c..a18e497 100644 > --- a/drivers/acpi/video.c > +++ b/drivers/acpi/video.c > @@ -782,6 +782,9 @@ static void acpi_video_device_find_cap(struct > acpi_video_device *device) > > ? ? ? ?if (acpi_video_backlight_support()) { > ? ? ? ? ? ? ? ?struct backlight_properties props; > + ? ? ? ? ? ? ? struct pci_dev *pdev; > + ? ? ? ? ? ? ? acpi_handle acpi_parent; > + ? ? ? ? ? ? ? struct device *parent = NULL; > ? ? ? ? ? ? ? ?int result; > ? ? ? ? ? ? ? ?static int count = 0; > ? ? ? ? ? ? ? ?char *name; > @@ -794,10 +797,20 @@ static void acpi_video_device_find_cap(struct > acpi_video_device *device) > ? ? ? ? ? ? ? ? ? ? ? ?return; > ? ? ? ? ? ? ? ?count++; > > + ? ? ? ? ? ? ? acpi_get_parent(device->dev->handle, &acpi_parent); > + > + ? ? ? ? ? ? ? pdev = acpi_get_pci_dev(acpi_parent); > + ? ? ? ? ? ? ? if (pdev) { > + ? ? ? ? ? ? ? ? ? ? ? parent = &pdev->dev; > + ? ? ? ? ? ? ? ? ? ? ? pci_dev_put(pdev); > + ? ? ? ? ? ? ? } > + > ? ? ? ? ? ? ? ?memset(&props, 0, sizeof(struct backlight_properties)); > ? ? ? ? ? ? ? ?props.type = BACKLIGHT_FIRMWARE; > ? ? ? ? ? ? ? ?props.max_brightness = device->brightness->count - 3; > - ? ? ? ? ? ? ? device->backlight = backlight_device_register(name, NULL, > device, > + ? ? ? ? ? ? ? device->backlight = backlight_device_register(name, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? device, > > ?&acpi_backlight_ops, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?&props); > ? ? ? ? ? ? ? ?kfree(name); Same in -git14 for my E6400 with a GM45 integrated chipset. Mine though has always printed out the following warning [Firmware Bug]: Duplicate ACPI video bus devices for the same VGA controller, please try module parameter "video.allow_duplicates=1"if the current driver doesn't work. which seems to have been previously discussed here https://lkml.org/lkml/2011/3/4/1 --alessandro ?"There's always a siren singing you to shipwreck" ?? (Radiohead, "There There") -- 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/