* [PATCH] pcmcia: Use dev_get_drvdata where possible
@ 2019-07-24 12:23 Chuhong Yuan
2019-11-21 10:03 ` Dominik Brodowski
0 siblings, 1 reply; 2+ messages in thread
From: Chuhong Yuan @ 2019-07-24 12:23 UTC (permalink / raw)
Cc: Dominik Brodowski, linux-kernel, Chuhong Yuan
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>
---
drivers/pcmcia/yenta_socket.c | 3 +--
1 file changed, 1 insertion(+), 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:");
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pcmcia: Use dev_get_drvdata where possible
2019-07-24 12:23 [PATCH] pcmcia: Use dev_get_drvdata where possible Chuhong Yuan
@ 2019-11-21 10:03 ` Dominik Brodowski
0 siblings, 0 replies; 2+ messages in thread
From: Dominik Brodowski @ 2019-11-21 10:03 UTC (permalink / raw)
To: Chuhong Yuan; +Cc: linux-kernel
On Wed, Jul 24, 2019 at 08:23:08PM +0800, Chuhong Yuan wrote:
> Instead of using to_pci_dev + pci_get_drvdata,
> use dev_get_drvdata to make code simpler.
Applied to the pcmcia tree.
Thanks,
Dominik
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-21 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 12:23 [PATCH] pcmcia: Use dev_get_drvdata where possible Chuhong Yuan
2019-11-21 10:03 ` Dominik Brodowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.