diff options
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/sccnxp.c | 8 | ||||
-rw-r--r-- | drivers/tty/tty_io.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index 418b495e3233..e869eab180be 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -15,6 +15,7 @@ #define SUPPORT_SYSRQ #endif +#include <linux/err.h> #include <linux/module.h> #include <linux/device.h> #include <linux/console.h> @@ -875,10 +876,9 @@ static int sccnxp_probe(struct platform_device *pdev) goto err_out; } - membase = devm_request_and_ioremap(&pdev->dev, res); - if (!membase) { - dev_err(&pdev->dev, "Failed to ioremap\n"); - ret = -EIO; + membase = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(membase)) { + ret = PTR_ERR(membase); goto err_out; } diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index da9fde850754..6b20fd66d4ad 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -2906,9 +2906,9 @@ void do_SAK(struct tty_struct *tty) EXPORT_SYMBOL(do_SAK); -static int dev_match_devt(struct device *dev, void *data) +static int dev_match_devt(struct device *dev, const void *data) { - dev_t *devt = data; + const dev_t *devt = data; return dev->devt == *devt; } |