]> git.sur5r.net Git - u-boot/commitdiff
dma: keystone_nav: remove spurious qm_cfg verification
authorKhoronzhuk, Ivan <ivan.khoronzhuk@ti.com>
Mon, 3 Nov 2014 23:39:27 +0000 (01:39 +0200)
committerTom Rini <trini@ti.com>
Thu, 6 Nov 2014 16:04:39 +0000 (11:04 -0500)
The verification qm_cfg existence is done at ksnav_init().
So, there is no need to verify it after initialization.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
drivers/dma/keystone_nav.c

index 77707c21098f45ca1c33d42470416717f8851f62..dfca75abdcb7c864317d0d41be0b79e59ec5c8a3 100644 (file)
@@ -81,9 +81,6 @@ void qm_close(void)
 {
        u32     j;
 
-       if (qm_cfg == NULL)
-               return;
-
        queue_close(qm_cfg->qpool_num);
 
        qm_cfg->mngr_cfg->link_ram_base0        = 0;
@@ -105,9 +102,6 @@ void qm_push(struct qm_host_desc *hd, u32 qnum)
 {
        u32 regd;
 
-       if (!qm_cfg)
-               return;
-
        cpu_to_bus((u32 *)hd, sizeof(struct qm_host_desc)/4);
        regd = (u32)hd | ((sizeof(struct qm_host_desc) >> 4) - 1);
        writel(regd, &qm_cfg->queue[qnum].ptr_size_thresh);
@@ -127,9 +121,6 @@ struct qm_host_desc *qm_pop(u32 qnum)
 {
        u32 uhd;
 
-       if (!qm_cfg)
-               return NULL;
-
        uhd = readl(&qm_cfg->queue[qnum].ptr_size_thresh) & ~0xf;
        if (uhd)
                cpu_to_bus((u32 *)uhd, sizeof(struct qm_host_desc)/4);
@@ -139,9 +130,6 @@ struct qm_host_desc *qm_pop(u32 qnum)
 
 struct qm_host_desc *qm_pop_from_free_pool(void)
 {
-       if (!qm_cfg)
-               return NULL;
-
        return qm_pop(qm_cfg->qpool_num);
 }