forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
84182fc7c1
commit
e2c0567597
|
@ -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:");
|
||||
|
|
Loading…
Reference in New Issue
Block a user