From aa6f5ffbdba45aa8e19e5048648fc6c7b25376d3 Mon Sep 17 00:00:00 2001 From: merge Date: Thu, 22 Jan 2009 13:55:32 +0000 Subject: MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage: From: merge MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage: From: merge MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage: From: Andy Green fix-stray-endmenu.patch Signed-off-by: Andy Green --- drivers/macintosh/Kconfig | 2 +- drivers/macintosh/macio_asic.c | 24 ++++++++++++------------ drivers/macintosh/rack-meter.c | 10 +++++----- drivers/macintosh/therm_adt746x.c | 8 ++++---- drivers/macintosh/via-cuda.c | 1 - drivers/macintosh/via-macii.c | 1 - drivers/macintosh/via-maciisi.c | 1 - drivers/macintosh/via-pmu.c | 4 ++-- drivers/macintosh/via-pmu68k.c | 1 - drivers/macintosh/windfarm_smu_sat.c | 5 +++-- 10 files changed, 27 insertions(+), 30 deletions(-) (limited to 'drivers/macintosh') diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index b52659620d5..173cf55c64d 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig @@ -138,7 +138,7 @@ config PMAC_BACKLIGHT Say Y here to enable Macintosh specific extensions of the generic backlight code. With this enabled, the brightness keys on older PowerBooks will be enabled so you can change the screen brightness. - Newer models should use an userspace daemon like pbbuttonsd. + Newer models should use a userspace daemon like pbbuttonsd. config PMAC_BACKLIGHT_LEGACY bool "Provide legacy ioctl's on /dev/pmu for the backlight" diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index ec9e5f32f0a..6e149f4a1ff 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c @@ -33,7 +33,7 @@ #undef DEBUG -#define MAX_NODE_NAME_SIZE (BUS_ID_SIZE - 12) +#define MAX_NODE_NAME_SIZE (20 - 12) static struct macio_chip *macio_on_hold; @@ -240,7 +240,7 @@ static void macio_create_fixup_irq(struct macio_dev *dev, int index, if (irq != NO_IRQ) { dev->interrupt[index].start = irq; dev->interrupt[index].flags = IORESOURCE_IRQ; - dev->interrupt[index].name = dev->ofdev.dev.bus_id; + dev->interrupt[index].name = dev_name(&dev->ofdev.dev); } if (dev->n_interrupts <= index) dev->n_interrupts = index + 1; @@ -303,7 +303,7 @@ static void macio_setup_interrupts(struct macio_dev *dev) break; res->start = irq; res->flags = IORESOURCE_IRQ; - res->name = dev->ofdev.dev.bus_id; + res->name = dev_name(&dev->ofdev.dev); if (macio_resource_quirks(np, res, i - 1)) { memset(res, 0, sizeof(struct resource)); continue; @@ -325,7 +325,7 @@ static void macio_setup_resources(struct macio_dev *dev, if (index >= MACIO_DEV_COUNT_RESOURCES) break; *res = r; - res->name = dev->ofdev.dev.bus_id; + res->name = dev_name(&dev->ofdev.dev); if (macio_resource_quirks(np, res, index)) { memset(res, 0, sizeof(struct resource)); @@ -338,7 +338,7 @@ static void macio_setup_resources(struct macio_dev *dev, if (insert_resource(parent_res, res)) { printk(KERN_WARNING "Can't request resource " "%d for MacIO device %s\n", - index, dev->ofdev.dev.bus_id); + index, dev_name(&dev->ofdev.dev)); } } dev->n_resources = index; @@ -385,8 +385,8 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, /* MacIO itself has a different reg, we use it's PCI base */ if (np == chip->of_node) { - sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s", - chip->lbus.index, + dev_set_name(&dev->ofdev.dev, "%1d.%08x:%.*s", + chip->lbus.index, #ifdef CONFIG_PCI (unsigned int)pci_resource_start(chip->lbus.pdev, 0), #else @@ -395,9 +395,9 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, MAX_NODE_NAME_SIZE, np->name); } else { reg = of_get_property(np, "reg", NULL); - sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s", - chip->lbus.index, - reg ? *reg : 0, MAX_NODE_NAME_SIZE, np->name); + dev_set_name(&dev->ofdev.dev, "%1d.%08x:%.*s", + chip->lbus.index, + reg ? *reg : 0, MAX_NODE_NAME_SIZE, np->name); } /* Setup interrupts & resources */ @@ -408,7 +408,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, /* Register with core */ if (of_device_register(&dev->ofdev) != 0) { printk(KERN_DEBUG"macio: device registration error for %s!\n", - dev->ofdev.dev.bus_id); + dev_name(&dev->ofdev.dev)); kfree(dev); return NULL; } @@ -558,7 +558,7 @@ err_out: resource_no, macio_resource_len(dev, resource_no), macio_resource_start(dev, resource_no), - dev->ofdev.dev.bus_id); + dev_name(&dev->ofdev.dev)); return -EBUSY; } diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 2c21d4f25cc..a98ab72adf9 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c @@ -288,7 +288,7 @@ static void __devexit rackmeter_stop_cpu_sniffer(struct rackmeter *rm) cancel_rearming_delayed_work(&rm->cpu[1].sniffer); } -static int rackmeter_setup(struct rackmeter *rm) +static int __devinit rackmeter_setup(struct rackmeter *rm) { pr_debug("rackmeter: setting up i2s..\n"); rackmeter_setup_i2s(rm); @@ -582,12 +582,12 @@ static struct of_device_id rackmeter_match[] = { { } }; -static struct macio_driver rackmeter_drv = { +static struct macio_driver rackmeter_driver = { .name = "rackmeter", .owner = THIS_MODULE, .match_table = rackmeter_match, .probe = rackmeter_probe, - .remove = rackmeter_remove, + .remove = __devexit_p(rackmeter_remove), .shutdown = rackmeter_shutdown, }; @@ -596,14 +596,14 @@ static int __init rackmeter_init(void) { pr_debug("rackmeter_init()\n"); - return macio_register_driver(&rackmeter_drv); + return macio_register_driver(&rackmeter_driver); } static void __exit rackmeter_exit(void) { pr_debug("rackmeter_exit()\n"); - macio_unregister_driver(&rackmeter_drv); + macio_unregister_driver(&rackmeter_driver); } module_init(rackmeter_init); diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 22bf981d393..82607add69a 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c @@ -554,7 +554,7 @@ thermostat_init(void) const u32 *prop; int i = 0, offset = 0; int err; - + np = of_find_node_by_name(NULL, "fan"); if (!np) return -ENODEV; @@ -613,13 +613,13 @@ thermostat_init(void) } of_dev = of_platform_device_create(np, "temperatures", NULL); - + of_node_put(np); + if (of_dev == NULL) { printk(KERN_ERR "Can't register temperatures device !\n"); - of_node_put(np); return -ENODEV; } - + err = device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature); err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature); err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_limit); diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c index 741a93a3eb6..62dd1fdafec 100644 --- a/drivers/macintosh/via-cuda.c +++ b/drivers/macintosh/via-cuda.c @@ -23,7 +23,6 @@ #else #include #include -#include #include #endif #include diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c index 6e6dd17ab57..817f37a875c 100644 --- a/drivers/macintosh/via-macii.c +++ b/drivers/macintosh/via-macii.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/drivers/macintosh/via-maciisi.c b/drivers/macintosh/via-maciisi.c index 2dc78804270..4d686c0bdea 100644 --- a/drivers/macintosh/via-maciisi.c +++ b/drivers/macintosh/via-maciisi.c @@ -24,7 +24,6 @@ #include #include #include -#include #include static volatile unsigned char *via; diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index d524dc245a2..b40fb9b6c86 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -1814,7 +1814,7 @@ static int powerbook_sleep_grackle(void) _set_L2CR(save_l2cr); /* Restore userland MMU context */ - set_context(current->active_mm->context.id, current->active_mm->pgd); + switch_mmu_context(NULL, current->active_mm); /* Power things up */ pmu_unlock(); @@ -1903,7 +1903,7 @@ powerbook_sleep_Core99(void) _set_L3CR(save_l3cr); /* Restore userland MMU context */ - set_context(current->active_mm->context.id, current->active_mm->pgd); + switch_mmu_context(NULL, current->active_mm); /* Tell PMU we are ready */ pmu_unlock(); diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c index b64741c95ac..fb9fa614a0e 100644 --- a/drivers/macintosh/via-pmu68k.c +++ b/drivers/macintosh/via-pmu68k.c @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index 7f2be4baaed..7847e981ac3 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c @@ -87,11 +87,12 @@ struct smu_sdbp_header *smu_sat_get_sdb_partition(unsigned int sat_id, int id, return NULL; } - len = i2c_smbus_read_word_data(&sat->i2c, 9); - if (len < 0) { + err = i2c_smbus_read_word_data(&sat->i2c, 9); + if (err < 0) { printk(KERN_ERR "smu_sat_get_sdb_part rd len error\n"); return NULL; } + len = err; if (len == 0) { printk(KERN_ERR "smu_sat_get_sdb_part no partition %x\n", id); return NULL; -- cgit v1.2.3