kernel: fix *-gpio-custom module unloading
[openwrt/openwrt.git] / package / kernel / i2c-gpio-custom / src / i2c-gpio-custom.c
index f9917e52fd649fb40f00951a9e00cd4cf1c578c4..23dfa36d6988e41646771d46228e78ea81556fae 100644 (file)
@@ -56,7 +56,7 @@
 
 #define DRV_NAME       "i2c-gpio-custom"
 #define DRV_DESC       "Custom GPIO-based I2C driver"
-#define DRV_VERSION    "0.1.1"
+#define DRV_VERSION    "0.1.2"
 
 #define PFX            DRV_NAME ": "
 
@@ -101,7 +101,7 @@ static void i2c_gpio_custom_cleanup(void)
 
        for (i = 0; i < nr_devices; i++)
                if (devices[i])
-                       platform_device_put(devices[i]);
+                       platform_device_unregister(devices[i]);
 }
 
 static int __init i2c_gpio_custom_add_one(unsigned int id, unsigned int *params)