The write() function could be used by printk(), which is atomic and
tweaking clock there can cause "BUG: sleeping function called from
invalid context".
Signed-off-by: Bao Haojun <hjbao@marvell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        unsigned long flags;
        int locked = 1;
 
-       clk_prepare_enable(up->clk);
 
        local_irq_save(flags);
        if (up->port.sysrq)
                spin_unlock(&up->port.lock);
        local_irq_restore(flags);
 
-       clk_disable_unprepare(up->clk);
 }
 
 #ifdef CONFIG_CONSOLE_POLL