Re: Exposing ROM's though sysfs

From: Greg KH (greg_at_kroah.com)
Date: 07/30/04

  • Next message: Andrew Zabolotny: "Re: Backlight and LCD module patches [2]"
    Date:	Fri, 30 Jul 2004 12:55:39 -0700
    To: Jesse Barnes <jbarnes@engr.sgi.com>
    
    

    On Fri, Jul 30, 2004 at 11:49:39AM -0700, Jesse Barnes wrote:
    > +
    > + /* If the device has a ROM, map it */
    > + if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) {
    > + pci_rom_attr.size = pci_resource_len(pdev, PCI_ROM_RESOURCE);
    > + sysfs_create_bin_file(&pdev->dev.kobj, &pci_rom_attr);
    > + }

    Doesn't this code cause _all_ rom sizes to be the same, as you only have
    1 pci_rom_attr variable? You should create a new one for every pci
    device (making sure to clean it up when the device is removed.)

    thanks,

    greg k-h
    -
    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/


  • Next message: Andrew Zabolotny: "Re: Backlight and LCD module patches [2]"

    Relevant Pages

    • Re: Message about PCILynx in kernel config
      ... > I think it might be confusing, so I suggest that the message shouldn't ... > be displayed at all if PCI isn't selected. ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • RE: [PATCH]PCI Express Port Bus Driver
      ... Greg KH wrote: ... > pci express driver, or fix up the PCI_GOMMCONFIG case in the acpi ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • [PATCH 5/8] PPC64 pci_dn.c: use pSeries reconfig notifier
      ... Use the pSeries_reconfig notifier list to handle newly added pci ... device nodes. ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: [sata] Promise PATA port on PDC2037x SATA
      ... Is your PCI id listed in this function? ... If yes, hrm. ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: The ultimate TOE design
      ... > still does), Southbridge, DDR-SDRAM, ancilliary chips for doing MAC, PHY, ... > Jeff was implying using garden-variety processors which seem to have large ... power from PCI. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)