]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
drm/i2c: ptn3460: Add dev node check to ready wait
authorSean Paul <seanpaul@chromium.org>
Mon, 19 Nov 2012 19:41:09 +0000 (14:41 -0500)
committerGerrit <chrome-bot@google.com>
Wed, 21 Nov 2012 15:57:12 +0000 (07:57 -0800)
Check for the ptn dev node in the ready wait function to avoid blocking
boards without ptn for 30 seconds.

BUG=chrome-os-partner:16280
TEST=None

Change-Id: I0057e7b72d9841447a56167617b9f081f5bbbe18
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38317
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
drivers/gpu/drm/i2c/ptn3460.c

index 6ec15baaaeabd242fc8b6b15601cf6b239654b31..4cc15f708c8a4ab14d50bb3ea2234feeca915acc 100644 (file)
@@ -50,6 +50,9 @@ int ptn3460_wait_until_ready(int timeout_ms)
        static atomic_t wait_queue_initialized;
        int ret;
 
+       if (!of_find_compatible_node(NULL, NULL, "nxp,ptn3460"))
+               return 0;
+
        if (atomic_add_return(1, &wait_queue_initialized) == 1)
                init_waitqueue_head(&ptn3460_wait_queue);