serial: sh-sci: Remove useless casts
[linux-block.git] / drivers / tty / serial / sh-sci.c
index be33d2b0613bb95a51092b1173c9d1291082a211..c93154f690a6f26a9df646654179d931f3d7a8c8 100644 (file)
@@ -428,7 +428,7 @@ static int sci_probe_regmap(struct plat_sci_port *cfg)
                cfg->regtype = SCIx_HSCIF_REGTYPE;
                break;
        default:
-               printk(KERN_ERR "Can't probe register map for given port\n");
+               pr_err("Can't probe register map for given port\n");
                return -EINVAL;
        }
 
@@ -2018,7 +2018,7 @@ static int sci_remap_port(struct uart_port *port)
                 * need to do any remapping, just cast the cookie
                 * directly.
                 */
-               port->membase = (void __iomem *)port->mapbase;
+               port->membase = (void __iomem *)(uintptr_t)port->mapbase;
        }
 
        return 0;
@@ -2389,8 +2389,7 @@ static inline int sci_probe_earlyprintk(struct platform_device *pdev)
 
 #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */
 
-static char banner[] __initdata =
-       KERN_INFO "SuperH (H)SCI(F) driver initialized\n";
+static const char banner[] __initconst = "SuperH (H)SCI(F) driver initialized";
 
 static struct uart_driver sci_uart_driver = {
        .owner          = THIS_MODULE,
@@ -2424,25 +2423,25 @@ struct sci_port_info {
 static const struct of_device_id of_sci_match[] = {
        {
                .compatible = "renesas,scif",
-               .data = (void *)&(const struct sci_port_info) {
+               .data = &(const struct sci_port_info) {
                        .type = PORT_SCIF,
                        .regtype = SCIx_SH4_SCIF_REGTYPE,
                },
        }, {
                .compatible = "renesas,scifa",
-               .data = (void *)&(const struct sci_port_info) {
+               .data = &(const struct sci_port_info) {
                        .type = PORT_SCIFA,
                        .regtype = SCIx_SCIFA_REGTYPE,
                },
        }, {
                .compatible = "renesas,scifb",
-               .data = (void *)&(const struct sci_port_info) {
+               .data = &(const struct sci_port_info) {
                        .type = PORT_SCIFB,
                        .regtype = SCIx_SCIFB_REGTYPE,
                },
        }, {
                .compatible = "renesas,hscif",
-               .data = (void *)&(const struct sci_port_info) {
+               .data = &(const struct sci_port_info) {
                        .type = PORT_HSCIF,
                        .regtype = SCIx_HSCIF_REGTYPE,
                },
@@ -2564,6 +2563,7 @@ static int sci_probe(struct platform_device *dev)
        ret = cpufreq_register_notifier(&sp->freq_transition,
                                        CPUFREQ_TRANSITION_NOTIFIER);
        if (unlikely(ret < 0)) {
+               uart_remove_one_port(&sci_uart_driver, &sp->port);
                sci_cleanup_single(sp);
                return ret;
        }
@@ -2615,7 +2615,7 @@ static int __init sci_init(void)
 {
        int ret;
 
-       printk(banner);
+       pr_info("%s\n", banner);
 
        ret = uart_register_driver(&sci_uart_driver);
        if (likely(ret == 0)) {