Re: [PATCH v2 1/5] drm/i915: add dev_to_i915 helper

Daniel Vetter
2014-12-09T10:07:58Z

On Tue, Dec 09, 2014 at 11:41:16AM +0200, Imre Deak wrote:
> +static inline struct drm_i915_private *dev_to_i915(struct device *dev)
> +{
> + return to_i915(pci_get_drvdata(to_pci_dev(dev)));
> +}

dev_get_drvdata. No need to upcast to pci_dev for pci_get_drvdata to
downcast to device again. Let's really simplify this ;-)
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch