Commit aec079f8 authored by Claudiu Beznea's avatar Claudiu Beznea Committed by Greg Kroah-Hartman
Browse files

tty: serial: atmel: use macros instead of hardcoded values

parent 4c9883e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2084,7 +2084,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state,
	struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
	struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);


	switch (state) {
	switch (state) {
	case 0:
	case UART_PM_STATE_ON:
		/*
		/*
		 * Enable the peripheral clock for this serial port.
		 * Enable the peripheral clock for this serial port.
		 * This is called on uart_open() or a resume event.
		 * This is called on uart_open() or a resume event.
@@ -2094,7 +2094,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state,
		/* re-enable interrupts if we disabled some on suspend */
		/* re-enable interrupts if we disabled some on suspend */
		atmel_uart_writel(port, ATMEL_US_IER, atmel_port->backup_imr);
		atmel_uart_writel(port, ATMEL_US_IER, atmel_port->backup_imr);
		break;
		break;
	case 3:
	case UART_PM_STATE_OFF:
		/* Back up the interrupt mask and disable all interrupts */
		/* Back up the interrupt mask and disable all interrupts */
		atmel_port->backup_imr = atmel_uart_readl(port, ATMEL_US_IMR);
		atmel_port->backup_imr = atmel_uart_readl(port, ATMEL_US_IMR);
		atmel_uart_writel(port, ATMEL_US_IDR, -1);
		atmel_uart_writel(port, ATMEL_US_IDR, -1);