diff mbox series

[U-Boot,020/126] sandbox: pci: Drop the get_devfn() method

Message ID 20190925145750.200592-21-sjg@chromium.org
State Accepted
Commit fae2c16ede7bf00c8f7873a96fc2b34d5345d751
Delegated to: Bin Meng
Headers show
Series x86: Add initial support for apollolake | expand

Commit Message

Simon Glass Sept. 25, 2019, 2:56 p.m. UTC
This method is not used anymore since the bus/device/function of PCI
devices can be obtained from their (parent's per-child) platform data.
Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/misc/swap_case.c | 8 --------
 include/pci.h            | 7 -------
 2 files changed, 15 deletions(-)

Comments

Bin Meng Oct. 5, 2019, 2:01 a.m. UTC | #1
On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
>
> This method is not used anymore since the bus/device/function of PCI
> devices can be obtained from their (parent's per-child) platform data.
> Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  drivers/misc/swap_case.c | 8 --------
>  include/pci.h            | 7 -------
>  2 files changed, 15 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Bin Meng Oct. 6, 2019, 9:28 a.m. UTC | #2
On Sat, Oct 5, 2019 at 10:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > This method is not used anymore since the bus/device/function of PCI
> > devices can be obtained from their (parent's per-child) platform data.
> > Drop it.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  drivers/misc/swap_case.c | 8 --------
> >  include/pci.h            | 7 -------
> >  2 files changed, 15 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86/next, thanks!
diff mbox series

Patch

diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c
index 8abf88a8fff..18d756e9cd5 100644
--- a/drivers/misc/swap_case.c
+++ b/drivers/misc/swap_case.c
@@ -54,13 +54,6 @@  struct swap_case_priv {
 	char mem_text[MEM_TEXT_SIZE];
 };
 
-static int sandbox_swap_case_get_devfn(struct udevice *dev)
-{
-	struct pci_child_platdata *plat = dev_get_parent_platdata(dev);
-
-	return plat->devfn;
-}
-
 static int sandbox_swap_case_use_ea(struct udevice *dev)
 {
 	return !!ofnode_get_property(dev->node, "use-ea", NULL);
@@ -393,7 +386,6 @@  static int sandbox_swap_case_unmap_physmem(struct udevice *dev,
 }
 
 static struct dm_pci_emul_ops sandbox_swap_case_emul_ops = {
-	.get_devfn = sandbox_swap_case_get_devfn,
 	.read_config = sandbox_swap_case_read_config,
 	.write_config = sandbox_swap_case_write_config,
 	.read_io = sandbox_swap_case_read_io,
diff --git a/include/pci.h b/include/pci.h
index 298d0d43559..999a594cddf 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -1490,13 +1490,6 @@  int dm_pci_find_class(uint find_class, int index, struct udevice **devp);
  * struct dm_pci_emul_ops - PCI device emulator operations
  */
 struct dm_pci_emul_ops {
-	/**
-	 * get_devfn(): Check which device and function this emulators
-	 *
-	 * @dev:	device to check
-	 * @return the device and function this emulates, or -ve on error
-	 */
-	int (*get_devfn)(struct udevice *dev);
 	/**
 	 * read_config() - Read a PCI configuration value
 	 *