const struct drm_display_mode *adjusted_mode)
 {
        const struct ns2501_configuration *conf;
-       struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
+       struct ns2501_priv *ns = dvo->dev_priv;
        int mode_idx, i;
 
        DRM_DEBUG_KMS
 /* set the NS2501 power state */
 static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable)
 {
-       struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
+       struct ns2501_priv *ns = dvo->dev_priv;
 
        DRM_DEBUG_KMS("Trying set the dpms of the DVO to %i\n", enable);