dm: core: Add a function to find a device by drvdata