Accessing a pdev or its members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

A third party driver has a probe function foo_probe(struct
platform_device) that ends up allocating and initializing a list of
various device structs:

struct device *dev = &pdev->dev;
struct ucsi_dev *udev;
udev = devm_kzalloc(dev, sizeof(*udev), GFP_KERNEL);
/* initialize udev to important data */
platform_set_drvdata(pdev, udev);

I have my own driver that I would like to use to access the *udev that
is created when the other device is probed. How would I access a pdev?
Or is there a way I can add a function to this driver to expose a
*udev? I can't seem to get to it without having a pointer to the pdev,
the udev, or some other device struct related to the hardware.

Thanks for the help,
Drew

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux