]> err.no Git - linux-2.6/blobdiff - drivers/ps3/vuart.c
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6] / drivers / ps3 / vuart.c
index 746298107d6fa97d5611f05a0e33d58b717281ed..7d7cab1d91b460a7311db72c8869e77d8eaf9de1 100644 (file)
@@ -82,14 +82,6 @@ struct ports_bmp {
        u64 unused[3];
 } __attribute__ ((aligned (32)));
 
-/* redefine dev_dbg to do a syntax check */
-
-#if !defined(DEBUG)
-#undef dev_dbg
-static inline int __attribute__ ((format (printf, 2, 3))) dev_dbg(
-       const struct device *_dev, const char *fmt, ...) {return 0;}
-#endif
-
 #define dump_ports_bmp(_b) _dump_ports_bmp(_b, __func__, __LINE__)
 static void __attribute__ ((unused)) _dump_ports_bmp(
        const struct ports_bmp* bmp, const char* func, int line)
@@ -952,7 +944,7 @@ fail_alloc_irq:
        kfree(dev->priv);
        dev->priv = NULL;
 fail_alloc:
-       vuart_bus_priv.devices[port_number] = 0;
+       vuart_bus_priv.devices[port_number] = NULL;
 fail_match:
        up(&vuart_bus_priv.probe_mutex);
        dev_dbg(&dev->core, "%s:%d failed\n", __func__, __LINE__);
@@ -978,7 +970,7 @@ static int ps3_vuart_remove(struct device *_dev)
                dev_dbg(&dev->core, "%s:%d: %s no remove method\n", __func__,
                        __LINE__, dev->core.bus_id);
 
-       vuart_bus_priv.devices[dev->priv->port_number] = 0;
+       vuart_bus_priv.devices[dev->priv->port_number] = NULL;
 
        if (--vuart_bus_priv.use_count == 0) {
                BUG();
@@ -1031,7 +1023,7 @@ int __init ps3_vuart_bus_init(void)
        pr_debug("%s:%d:\n", __func__, __LINE__);
 
        if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
-               return 0;
+               return -ENODEV;
 
        init_MUTEX(&vuart_bus_priv.probe_mutex);
        result = bus_register(&ps3_vuart_bus);