/* Displays the given string on the LCD-Display of newer machines. lcd_print() disables/enables the timer-based led work queue to avoid a race condition while writing the CMD/DATA register pair.  */
int lcd_print(const char *str)
/* Displays the given string on the LCD-Display of newer machines. lcd_print() disables/enables the timer-based led work queue to avoid a race condition while writing the CMD/DATA register pair.  */
int lcd_print(const char *str)
{
	int i;
	if (!led_func_ptr || lcd_info.model != DISPLAY_MODEL_LCD)
	    return 0;
	if (led_wq)
		cancel_delayed_work_sync(&led_task);
	strlcpy(lcd_text, str, sizeof(lcd_text));
	gsc_writeb(lcd_info.reset_cmd1, LCD_CMD_REG);
	udelay(lcd_info.min_cmd_delay);
	for (i=0; i < lcd_info.lcd_width; i++) {
	    if (str && *str)
		gsc_writeb(*str++, LCD_DATA_REG);
	    else
		gsc_writeb(' ', LCD_DATA_REG);
	    udelay(lcd_info.min_cmd_delay);
	}
	if (led_wq) {
		queue_delayed_work(led_wq, &led_task, 0);
	}
	return lcd_info.lcd_width;
}