diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 15:40:58 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 15:40:58 -0700 |
commit | 3f19334f1867108db84597c958f8d695a8a993f6 (patch) | |
tree | 87b6cf31b5e51d8a9dafd6b2c576b07934f25bf3 | |
parent | 35822851f6bc145107d8e26817cee9d163e40e63 (diff) | |
download | longterm-queue-2.6.33-3f19334f1867108db84597c958f8d695a8a993f6.tar.gz |
.33
5 files changed, 251 insertions, 0 deletions
diff --git a/queue-2.6.33/hwmon-f71882fg-set-platform-drvdata-to-null-later.patch b/queue-2.6.33/hwmon-f71882fg-set-platform-drvdata-to-null-later.patch new file mode 100644 index 0000000..2687597 --- /dev/null +++ b/queue-2.6.33/hwmon-f71882fg-set-platform-drvdata-to-null-later.patch @@ -0,0 +1,38 @@ +From d9ebaa45472c92704f4814682eec21455edcfa1f Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Sun, 13 Mar 2011 13:50:33 +0100 +Subject: hwmon/f71882fg: Set platform drvdata to NULL later + +From: Hans de Goede <hdegoede@redhat.com> + +commit d9ebaa45472c92704f4814682eec21455edcfa1f upstream. + +This avoids a possible race leading to trying to dereference NULL. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +Acked-by: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/hwmon/f71882fg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/hwmon/f71882fg.c ++++ b/drivers/hwmon/f71882fg.c +@@ -2031,7 +2031,6 @@ static int f71882fg_remove(struct platfo + int nr_fans = (data->type == f71882fg) ? 4 : 3; + u8 start_reg = f71882fg_read8(data, F71882FG_REG_START); + +- platform_set_drvdata(pdev, NULL); + if (data->hwmon_dev) + hwmon_device_unregister(data->hwmon_dev); + +@@ -2098,6 +2097,7 @@ static int f71882fg_remove(struct platfo + } + } + ++ platform_set_drvdata(pdev, NULL); + kfree(data); + + return 0; diff --git a/queue-2.6.33/mtd-add-platform-prefix-for-platform-modalias.patch b/queue-2.6.33/mtd-add-platform-prefix-for-platform-modalias.patch new file mode 100644 index 0000000..bccc55d --- /dev/null +++ b/queue-2.6.33/mtd-add-platform-prefix-for-platform-modalias.patch @@ -0,0 +1,55 @@ +From c804c733846572ca85c2bba60c7fe6fa024dff18 Mon Sep 17 00:00:00 2001 +From: Axel Lin <axel.lin@gmail.com> +Date: Mon, 7 Mar 2011 11:04:24 +0800 +Subject: mtd: add "platform:" prefix for platform modalias + +From: Axel Lin <axel.lin@gmail.com> + +commit c804c733846572ca85c2bba60c7fe6fa024dff18 upstream. + +Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS +with "platform:"), the platform modalias is prefixed with "platform:". + +Signed-off-by: Axel Lin <axel.lin@gmail.com> +Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> +Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/mtd/nand/omap2.c | 2 +- + drivers/mtd/onenand/generic.c | 2 +- + drivers/mtd/onenand/omap2.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/mtd/nand/omap2.c ++++ b/drivers/mtd/nand/omap2.c +@@ -1099,6 +1099,6 @@ static void __exit omap_nand_exit(void) + module_init(omap_nand_init); + module_exit(omap_nand_exit); + +-MODULE_ALIAS(DRIVER_NAME); ++MODULE_ALIAS("platform:" DRIVER_NAME); + MODULE_LICENSE("GPL"); + MODULE_DESCRIPTION("Glue layer for NAND flash on TI OMAP boards"); +--- a/drivers/mtd/onenand/generic.c ++++ b/drivers/mtd/onenand/generic.c +@@ -131,7 +131,7 @@ static struct platform_driver generic_on + .remove = __devexit_p(generic_onenand_remove), + }; + +-MODULE_ALIAS(DRIVER_NAME); ++MODULE_ALIAS("platform:" DRIVER_NAME); + + static int __init generic_onenand_init(void) + { +--- a/drivers/mtd/onenand/omap2.c ++++ b/drivers/mtd/onenand/omap2.c +@@ -814,7 +814,7 @@ static void __exit omap2_onenand_exit(vo + module_init(omap2_onenand_init); + module_exit(omap2_onenand_exit); + +-MODULE_ALIAS(DRIVER_NAME); ++MODULE_ALIAS("platform:" DRIVER_NAME); + MODULE_LICENSE("GPL"); + MODULE_AUTHOR("Jarkko Lavinen <jarkko.lavinen@nokia.com>"); + MODULE_DESCRIPTION("Glue layer for OneNAND flash on OMAP2 / OMAP3"); diff --git a/queue-2.6.33/mtd-jedec_probe-change-variable-name-from-cfi_p-to-cfi.patch b/queue-2.6.33/mtd-jedec_probe-change-variable-name-from-cfi_p-to-cfi.patch new file mode 100644 index 0000000..2f697f9 --- /dev/null +++ b/queue-2.6.33/mtd-jedec_probe-change-variable-name-from-cfi_p-to-cfi.patch @@ -0,0 +1,92 @@ +From efba2e313ea1b1bd69a7c4659263becf43bb1adc Mon Sep 17 00:00:00 2001 +From: Antony Pavlov <antony@niisi.msk.ru> +Date: Fri, 11 Feb 2011 13:00:37 +0300 +Subject: mtd: jedec_probe: Change variable name from cfi_p to cfi + +From: Antony Pavlov <antony@niisi.msk.ru> + +commit efba2e313ea1b1bd69a7c4659263becf43bb1adc upstream. + +In the following commit, we'll need to use the CMD() macro in order to +fix the initialisation of the sector_erase_cmd field. That requires the +local variable to be called 'cfi', so change it first in a simple patch. + +Signed-off-by: Antony Pavlov <antony@niisi.msk.ru> +Acked-by: Guillaume LECERF <glecerf@gmail.com> +Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/mtd/chips/jedec_probe.c | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +--- a/drivers/mtd/chips/jedec_probe.c ++++ b/drivers/mtd/chips/jedec_probe.c +@@ -1923,14 +1923,14 @@ static void jedec_reset(u32 base, struct + } + + +-static int cfi_jedec_setup(struct cfi_private *p_cfi, int index) ++static int cfi_jedec_setup(struct cfi_private *cfi, int index) + { + int i,num_erase_regions; + uint8_t uaddr; + +- if (! (jedec_table[index].devtypes & p_cfi->device_type)) { ++ if (!(jedec_table[index].devtypes & cfi->device_type)) { + DEBUG(MTD_DEBUG_LEVEL1, "Rejecting potential %s with incompatible %d-bit device type\n", +- jedec_table[index].name, 4 * (1<<p_cfi->device_type)); ++ jedec_table[index].name, 4 * (1<<cfi->device_type)); + return 0; + } + +@@ -1938,27 +1938,27 @@ static int cfi_jedec_setup(struct cfi_pr + + num_erase_regions = jedec_table[index].nr_regions; + +- p_cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); +- if (!p_cfi->cfiq) { ++ cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); ++ if (!cfi->cfiq) { + //xx printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name); + return 0; + } + +- memset(p_cfi->cfiq,0,sizeof(struct cfi_ident)); ++ memset(cfi->cfiq, 0, sizeof(struct cfi_ident)); + +- p_cfi->cfiq->P_ID = jedec_table[index].cmd_set; +- p_cfi->cfiq->NumEraseRegions = jedec_table[index].nr_regions; +- p_cfi->cfiq->DevSize = jedec_table[index].dev_size; +- p_cfi->cfi_mode = CFI_MODE_JEDEC; ++ cfi->cfiq->P_ID = jedec_table[index].cmd_set; ++ cfi->cfiq->NumEraseRegions = jedec_table[index].nr_regions; ++ cfi->cfiq->DevSize = jedec_table[index].dev_size; ++ cfi->cfi_mode = CFI_MODE_JEDEC; + + for (i=0; i<num_erase_regions; i++){ +- p_cfi->cfiq->EraseRegionInfo[i] = jedec_table[index].regions[i]; ++ cfi->cfiq->EraseRegionInfo[i] = jedec_table[index].regions[i]; + } +- p_cfi->cmdset_priv = NULL; ++ cfi->cmdset_priv = NULL; + + /* This may be redundant for some cases, but it doesn't hurt */ +- p_cfi->mfr = jedec_table[index].mfr_id; +- p_cfi->id = jedec_table[index].dev_id; ++ cfi->mfr = jedec_table[index].mfr_id; ++ cfi->id = jedec_table[index].dev_id; + + uaddr = jedec_table[index].uaddr; + +@@ -1966,8 +1966,8 @@ static int cfi_jedec_setup(struct cfi_pr + our brains explode when we see the datasheets talking about address + lines numbered from A-1 to A18. The CFI table has unlock addresses + in device-words according to the mode the device is connected in */ +- p_cfi->addr_unlock1 = unlock_addrs[uaddr].addr1 / p_cfi->device_type; +- p_cfi->addr_unlock2 = unlock_addrs[uaddr].addr2 / p_cfi->device_type; ++ cfi->addr_unlock1 = unlock_addrs[uaddr].addr1 / cfi->device_type; ++ cfi->addr_unlock2 = unlock_addrs[uaddr].addr2 / cfi->device_type; + + return 1; /* ok */ + } diff --git a/queue-2.6.33/mtd-jedec_probe-initialise-make-sector-erase-command-variable.patch b/queue-2.6.33/mtd-jedec_probe-initialise-make-sector-erase-command-variable.patch new file mode 100644 index 0000000..2021343 --- /dev/null +++ b/queue-2.6.33/mtd-jedec_probe-initialise-make-sector-erase-command-variable.patch @@ -0,0 +1,62 @@ +From ceabebb2bd2672f709e4454e16bc6042732e2dfe Mon Sep 17 00:00:00 2001 +From: Antony Pavlov <antony@niisi.msk.ru> +Date: Fri, 11 Feb 2011 13:00:37 +0300 +Subject: mtd: jedec_probe: initialise make sector erase command variable + +From: Antony Pavlov <antony@niisi.msk.ru> + +commit ceabebb2bd2672f709e4454e16bc6042732e2dfe upstream. + +In the commit 08968041bef437ec363623cd3218c2b083537ada + (mtd: cfi_cmdset_0002: make sector erase command variable) +introdused a field sector_erase_cmd. In the same commit initialisation +of cfi->sector_erase_cmd made in cfi_chip_setup() +(file drivers/mtd/chips/cfi_probe.c), so the CFI chip has no problem: + +... + cfi->cfi_mode = CFI_MODE_CFI; + cfi->sector_erase_cmd = CMD(0x30); +... + +But for the JEDEC chips this initialisation is not carried out, +so the JEDEC chips have sector_erase_cmd == 0. + +This patch adds the missing initialisation. + +Signed-off-by: Antony Pavlov <antony@niisi.msk.ru> +Acked-by: Guillaume LECERF <glecerf@gmail.com> +Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/mtd/chips/jedec_probe.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/mtd/chips/jedec_probe.c ++++ b/drivers/mtd/chips/jedec_probe.c +@@ -1923,7 +1923,7 @@ static void jedec_reset(u32 base, struct + } + + +-static int cfi_jedec_setup(struct cfi_private *cfi, int index) ++static int cfi_jedec_setup(struct map_info *map, struct cfi_private *cfi, int index) + { + int i,num_erase_regions; + uint8_t uaddr; +@@ -1950,6 +1950,7 @@ static int cfi_jedec_setup(struct cfi_pr + cfi->cfiq->NumEraseRegions = jedec_table[index].nr_regions; + cfi->cfiq->DevSize = jedec_table[index].dev_size; + cfi->cfi_mode = CFI_MODE_JEDEC; ++ cfi->sector_erase_cmd = CMD(0x30); + + for (i=0; i<num_erase_regions; i++){ + cfi->cfiq->EraseRegionInfo[i] = jedec_table[index].regions[i]; +@@ -2163,7 +2164,7 @@ static int jedec_probe_chip(struct map_i + "MTD %s(): matched device 0x%x,0x%x unlock_addrs: 0x%.4x 0x%.4x\n", + __func__, cfi->mfr, cfi->id, + cfi->addr_unlock1, cfi->addr_unlock2 ); +- if (!cfi_jedec_setup(cfi, i)) ++ if (!cfi_jedec_setup(map, cfi, i)) + return 0; + goto ok_out; + } diff --git a/queue-2.6.33/series b/queue-2.6.33/series index e174ac0..57b18cd 100644 --- a/queue-2.6.33/series +++ b/queue-2.6.33/series @@ -425,3 +425,7 @@ nfsd-wrong-index-used-in-inner-loop.patch r8169-use-rxfifo-overflow-workaround-for-8168c-chipset.patch dib7000m-add-pid-filtering.patch net-don-t-allow-cap_net_admin-to-load-non-netdev-kernel-modules.patch +hwmon-f71882fg-set-platform-drvdata-to-null-later.patch +mtd-jedec_probe-change-variable-name-from-cfi_p-to-cfi.patch +mtd-jedec_probe-initialise-make-sector-erase-command-variable.patch +mtd-add-platform-prefix-for-platform-modalias.patch |