summaryrefslogtreecommitdiff
path: root/drivers/pcmcia/yenta_socket.c
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-07-24 15:23:08 +0300
committerDominik Brodowski <linux@dominikbrodowski.net>2019-11-21 09:51:46 +0300
commite2c05675979707b337b7af6319a9053bd286ed50 (patch)
tree84f153eb277c9de53004b88904445dd33782c9e1 /drivers/pcmcia/yenta_socket.c
parent84182fc7c16f3e882977879c464fa14f2561bfad (diff)
downloadlinux-e2c05675979707b337b7af6319a9053bd286ed50.tar.xz
pcmcia: Use dev_get_drvdata where possible
Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/yenta_socket.c')
-rw-r--r--drivers/pcmcia/yenta_socket.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 810761ab8e9d..49b1c6a1bdbe 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -173,8 +173,7 @@ static void exca_writew(struct yenta_socket *socket, unsigned reg, u16 val)
static ssize_t show_yenta_registers(struct device *yentadev, struct device_attribute *attr, char *buf)
{
- struct pci_dev *dev = to_pci_dev(yentadev);
- struct yenta_socket *socket = pci_get_drvdata(dev);
+ struct yenta_socket *socket = dev_get_drvdata(yentadev);
int offset = 0, i;
offset = snprintf(buf, PAGE_SIZE, "CB registers:");