misc: rtsx: Find L1 PM Substates capability instead of hard-coding
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 21 Jul 2020 21:23:35 +0000 (16:23 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 11:34:27 +0000 (13:34 +0200)
commited86a9877d05b99088a409a7603828b818a433dc
tree436f0f9618360dd11ed87d858ea4292988fac325
parent22bf3251d7b7da0339f41ec27f2c3d4e0ec02255
misc: rtsx: Find L1 PM Substates capability instead of hard-coding

Instead of hard-coding the location of the L1 PM Substates capability based
on the Device ID, search for it in the extended capabilities list.  This
works for any device, as long as it implements the L1 PM Substates
capability correctly, so it doesn't require maintenance as new devices are
added.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200721212336.1159079-5-helgaas@kernel.org
[ minor addition due to differences in my tree - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/cardreader/rts5228.c
drivers/misc/cardreader/rts5249.c
drivers/misc/cardreader/rts5260.c
drivers/misc/cardreader/rts5261.c
include/linux/rtsx_pci.h