Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Jul 2010 21:32:59 +0000 (14:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Jul 2010 21:32:59 +0000 (14:32 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: Pass the correct end of buffer to p9stat_read

drivers/edac/mpc85xx_edac.c
drivers/gpio/gpiolib.c
drivers/rtc/rtc-rx8581.c
kernel/module.c

index f39b00a46eda36c1d6e6d265e7aa02245d012556..1052340e6802658db085627f501f3c6102347e67 100644 (file)
@@ -336,6 +336,7 @@ static struct of_device_id mpc85xx_pci_err_of_match[] = {
        },
        {},
 };
+MODULE_DEVICE_TABLE(of, mpc85xx_pci_err_of_match);
 
 static struct of_platform_driver mpc85xx_pci_err_driver = {
        .probe = mpc85xx_pci_err_probe,
@@ -650,6 +651,7 @@ static struct of_device_id mpc85xx_l2_err_of_match[] = {
        { .compatible = "fsl,p2020-l2-cache-controller", },
        {},
 };
+MODULE_DEVICE_TABLE(of, mpc85xx_l2_err_of_match);
 
 static struct of_platform_driver mpc85xx_l2_err_driver = {
        .probe = mpc85xx_l2_err_probe,
@@ -1126,6 +1128,7 @@ static struct of_device_id mpc85xx_mc_err_of_match[] = {
        { .compatible = "fsl,p2020-memory-controller", },
        {},
 };
+MODULE_DEVICE_TABLE(of, mpc85xx_mc_err_of_match);
 
 static struct of_platform_driver mpc85xx_mc_err_driver = {
        .probe = mpc85xx_mc_err_probe,
index 3ca36542e3385b0c62a33b703e637fac31884c93..4e51fe3c1fc4f97594d96fcb9a4e719fa40b8edc 100644 (file)
@@ -893,10 +893,12 @@ EXPORT_SYMBOL_GPL(gpio_sysfs_set_active_low);
 void gpio_unexport(unsigned gpio)
 {
        struct gpio_desc        *desc;
-       int                     status = -EINVAL;
+       int                     status = 0;
 
-       if (!gpio_is_valid(gpio))
+       if (!gpio_is_valid(gpio)) {
+               status = -EINVAL;
                goto done;
+       }
 
        mutex_lock(&sysfs_lock);
 
@@ -911,7 +913,6 @@ void gpio_unexport(unsigned gpio)
                        clear_bit(FLAG_EXPORT, &desc->flags);
                        put_device(dev);
                        device_unregister(dev);
-                       status = 0;
                } else
                        status = -ENODEV;
        }
index 9718aaaa821534c876240e1f254166f800bbbd7f..600b890a3c150f926be508633c49436cfae1b113 100644 (file)
@@ -168,7 +168,7 @@ static int rx8581_set_datetime(struct i2c_client *client, struct rtc_time *tm)
                return -EIO;
        }
 
-       err = i2c_smbus_write_byte_data(client, RX8581_REG_FLAG,
+       err = i2c_smbus_write_byte_data(client, RX8581_REG_CTRL,
                (data | RX8581_CTRL_STOP));
        if (err < 0) {
                dev_err(&client->dev, "Unable to write control register\n");
@@ -182,6 +182,20 @@ static int rx8581_set_datetime(struct i2c_client *client, struct rtc_time *tm)
                return -EIO;
        }
 
+       /* get VLF and clear it */
+       data = i2c_smbus_read_byte_data(client, RX8581_REG_FLAG);
+       if (data < 0) {
+               dev_err(&client->dev, "Unable to read flag register\n");
+               return -EIO;
+       }
+
+       err = i2c_smbus_write_byte_data(client, RX8581_REG_FLAG,
+               (data & ~(RX8581_FLAG_VLF)));
+       if (err != 0) {
+               dev_err(&client->dev, "Unable to write flag register\n");
+               return -EIO;
+       }
+
        /* Restart the clock */
        data = i2c_smbus_read_byte_data(client, RX8581_REG_CTRL);
        if (data < 0) {
@@ -189,8 +203,8 @@ static int rx8581_set_datetime(struct i2c_client *client, struct rtc_time *tm)
                return -EIO;
        }
 
-       err = i2c_smbus_write_byte_data(client, RX8581_REG_FLAG,
-               (data | ~(RX8581_CTRL_STOP)));
+       err = i2c_smbus_write_byte_data(client, RX8581_REG_CTRL,
+               (data & ~(RX8581_CTRL_STOP)));
        if (err != 0) {
                dev_err(&client->dev, "Unable to write control register\n");
                return -EIO;
index 5d2d28197c827a840d98357c11c1e16b3dce92a2..6c562828c85c2d3d952c46be2de0b2cb0b3748a9 100644 (file)
@@ -787,7 +787,6 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
 
        /* Store the name of the last unloaded module for diagnostic purposes */
        strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
-       ddebug_remove_module(mod->name);
 
        free_module(mod);
        return 0;
@@ -1550,6 +1549,9 @@ static void free_module(struct module *mod)
        remove_sect_attrs(mod);
        mod_kobject_remove(mod);
 
+       /* Remove dynamic debug info */
+       ddebug_remove_module(mod->name);
+
        /* Arch-specific cleanup. */
        module_arch_cleanup(mod);