serial: max310x: Always use dynamic GPIO ID assignment
Always register GPIOs and use dynamic GPIO ID assignment. This is no much worth if GPIOs is not used, but helps remove private driver header and add DT support in the future. Additionally, patch adds missing uart_unregister_driver() call if probe() fails. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d3a8a252e1
commit
dba29a2894
2 changed files with 28 additions and 30 deletions
|
@ -21,7 +21,6 @@
|
|||
*
|
||||
* static struct max310x_pdata max3107_pdata = {
|
||||
* .uart_flags[0] = MAX310X_ECHO_SUPRESS | MAX310X_AUTO_DIR_CTRL,
|
||||
* .gpio_base = -1,
|
||||
* };
|
||||
*
|
||||
* static struct spi_board_info spi_device_max3107[] = {
|
||||
|
@ -45,8 +44,6 @@ struct max310x_pdata {
|
|||
#define MAX310X_AUTO_DIR_CTRL (0x00000004) /* Enable Auto direction
|
||||
* control (RS-485)
|
||||
*/
|
||||
/* GPIO base number (can be negative) */
|
||||
const int gpio_base;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue