Krzysztof Wilczyński 527139d738 PCI/sysfs: Convert "rom" to static attribute
The "rom" sysfs attribute allows access to the PCI Option ROM.  Previously
it was dynamically created either by pci_bus_add_device() or the
pci_sysfs_init() initcall, but since it doesn't need to be created or
removed dynamically, we can use a static attribute so the device model
takes care of addition and removal automatically.

Convert "rom" to a static attribute and use the .is_bin_visible() callback
to set the correct object size based on the ROM size.

Remove "rom_attr" from the struct pci_dev since it is no longer needed.

This attribute was added in the pre-git era by https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/drivers/pci/pci-sysfs.c?id=f6d553444da2

[bhelgaas: commit log]
Suggested-by: Oliver O'Halloran <oohall@gmail.com>
Link: https://lore.kernel.org/r/20210416205856.3234481-3-kw@linux.com
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2021-04-27 17:53:17 -05:00
..
2021-02-02 00:16:57 +01:00
2020-12-09 19:26:02 -06:00
2021-02-22 10:27:48 -08:00
2021-01-23 14:57:21 +01:00
2021-02-21 14:44:44 -08:00
2021-02-22 09:27:18 -08:00
2021-02-22 13:29:55 -08:00
2021-02-25 10:17:31 -08:00
2021-02-26 15:49:51 -07:00
2020-11-06 08:08:37 -08:00
2020-12-02 09:46:55 -07:00
2021-01-24 14:27:17 +01:00
2021-02-26 09:41:03 -08:00
2021-02-17 14:07:48 +01:00
2020-12-19 11:18:38 -08:00
2021-01-21 14:06:00 -07:00
2021-01-06 16:24:59 -08:00
2021-02-28 12:06:45 -08:00
2020-10-16 17:21:51 +02:00
2020-10-13 15:58:10 -07:00
2020-10-19 14:28:30 -07:00
2021-01-16 15:12:06 -05:00
2021-01-18 14:26:51 +01:00
2021-02-24 09:54:24 -08:00
2021-02-08 12:28:07 +01:00
2020-12-10 12:42:59 -06:00
2020-11-16 16:31:41 +01:00
2020-12-17 11:18:00 -08:00
2020-11-16 15:20:01 +01:00
2020-11-16 08:14:30 -07:00
2021-02-11 13:24:44 -08:00
2021-02-23 13:39:45 -08:00
2020-12-02 22:10:35 -08:00
2021-03-04 06:36:22 -07:00
2020-11-23 14:16:55 +00:00
2021-02-21 10:29:20 -08:00
2021-01-27 12:27:36 +01:00
2020-11-24 16:47:48 +01:00
2020-12-15 16:19:31 +01:00
2021-02-26 09:41:03 -08:00
2021-01-18 16:13:51 +01:00
2020-12-15 16:19:31 +01:00
2021-02-17 14:12:42 +01:00
2021-02-26 10:19:03 -08:00
2021-01-21 16:16:10 +00:00
2021-02-26 09:41:02 -08:00
2021-02-26 09:41:03 -08:00
2021-01-22 15:09:42 +01:00
2021-01-14 11:20:17 +01:00
2021-02-23 13:39:45 -08:00
2021-02-23 13:39:45 -08:00
2021-02-26 09:41:03 -08:00
2021-02-08 12:28:07 +01:00
2021-01-04 11:42:21 -05:00
2021-02-16 16:11:14 -05:00
2021-02-26 09:17:24 -08:00
2021-02-02 10:26:12 +01:00
2021-02-17 13:17:49 -08:00
2020-12-15 14:02:26 -08:00
2020-10-17 11:18:18 -07:00
2021-02-26 09:40:59 -08:00
2021-01-21 14:06:00 -07:00
2021-02-03 19:05:50 +01:00
2021-02-25 09:56:08 -08:00
2020-10-18 09:27:10 -07:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:20 +01:00
2021-02-26 09:41:03 -08:00
2021-02-21 12:35:04 -08:00
2020-12-03 11:20:52 +01:00
2021-01-16 23:19:26 +01:00
2020-12-15 15:57:25 -08:00
2020-12-07 17:12:49 -07:00
2020-12-16 16:38:41 -08:00
2020-12-16 11:30:10 -08:00
2021-02-23 13:39:45 -08:00
2020-11-06 10:05:18 -08:00
2020-12-10 16:17:15 +01:00
2021-01-28 00:35:03 +01:00
2020-11-24 16:47:49 +01:00
2020-12-10 10:45:36 +01:00
2021-03-02 17:25:46 -07:00
2021-02-20 10:13:32 -05:00
2021-02-23 13:39:45 -08:00
2020-12-14 16:40:27 -08:00
2020-10-30 21:57:04 +01:00
2021-01-06 16:24:59 -08:00
2020-12-16 12:33:35 -08:00
2021-02-09 12:27:29 -05:00
2020-12-04 16:54:35 +01:00
2021-02-20 21:28:04 -08:00
2021-02-13 17:17:53 +01:00
2020-11-09 18:39:36 +01:00
2021-01-21 16:16:10 +00:00
2021-02-01 13:20:07 -07:00
2021-01-18 10:52:41 +01:00
2021-02-09 12:15:07 +01:00
2021-01-21 14:06:00 -07:00
2020-10-20 14:39:37 -07:00
2021-01-24 14:27:17 +01:00
2021-02-08 22:58:55 +01:00