Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8192e: Remove one of two checks for hardware RTL8192SE

Check for hardware RTL8192SE is done in function _rtl92e_pci_probe()
directly and also two lines later in function rtl92e_check_adapter().
Remove top level check to increase readability.
This pci_read does not follow a pci_write to ensure data is written to
the device.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4126cca73739c75b1a0379af2ef8b0c63a705639.1680902603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Philipp Hortmann and committed by
Greg Kroah-Hartman
a273033c edc332a9

-6
-6
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
··· 2130 2130 struct r8192_priv *priv = NULL; 2131 2131 unsigned long pmem_start, pmem_len, pmem_flags; 2132 2132 int err = -ENOMEM; 2133 - u8 revision_id; 2134 2133 2135 2134 if (pci_enable_device(pdev)) { 2136 2135 dev_err(&pdev->dev, "Failed to enable PCI device"); ··· 2187 2188 2188 2189 dev->mem_start = ioaddr; 2189 2190 dev->mem_end = ioaddr + pci_resource_len(pdev, 0); 2190 - 2191 - pci_read_config_byte(pdev, 0x08, &revision_id); 2192 - /* If the revisionid is 0x10, the device uses rtl8192se. */ 2193 - if (pdev->device == 0x8192 && revision_id == 0x10) 2194 - goto err_unmap; 2195 2191 2196 2192 if (!rtl92e_check_adapter(pdev, dev)) 2197 2193 goto err_unmap;