From bcdc46cb55aa77b4f5b9b1803620eb665070a7ee Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sun, 5 Dec 2010 00:02:57 +0100 Subject: [PATCH 1/1] Update Shark 5200 patch to 2.6.36.1 --- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 1 + arch/powerpc/platforms/52xx/shark_pm.c | 3 --- drivers/mtd/maps/shark_pmap_of.c | 21 +++++++++++++-------- drivers/serial/mpc52xx_uart.c | 3 ++- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index fea833e18ad..dca72142300 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c @@ -68,6 +68,7 @@ #include #include #include +#include MODULE_DESCRIPTION("Freescale MPC52xx gpt driver"); MODULE_AUTHOR("Sascha Hauer, Grant Likely, Albrecht Dreß"); diff --git a/arch/powerpc/platforms/52xx/shark_pm.c b/arch/powerpc/platforms/52xx/shark_pm.c index a24684df5c5..ed89f81c276 100644 --- a/arch/powerpc/platforms/52xx/shark_pm.c +++ b/arch/powerpc/platforms/52xx/shark_pm.c @@ -217,9 +217,6 @@ static int shark_pm_enter(suspend_state_t state) shark_restore_regs(); - /* restart jiffies */ - wakeup_decrementer(); - iounmap(mbar); return 0; } diff --git a/drivers/mtd/maps/shark_pmap_of.c b/drivers/mtd/maps/shark_pmap_of.c index ff2ad98633f..ec24c0ea112 100644 --- a/drivers/mtd/maps/shark_pmap_of.c +++ b/drivers/mtd/maps/shark_pmap_of.c @@ -23,6 +23,7 @@ #include #include #include +#include struct of_flash { struct mtd_info *mtd; @@ -98,7 +99,7 @@ static void __xipram of_shark_map_copy_to(struct map_info *map, unsigned long to #ifdef CONFIG_MTD_PARTITIONS #define OF_FLASH_PARTS(info) ((info)->parts) -static int parse_obsolete_partitions(struct of_device *dev, +static int parse_obsolete_partitions(struct platform_device *dev, struct of_flash *info, struct device_node *dp) { @@ -148,7 +149,7 @@ static int parse_obsolete_partitions(struct of_device *dev, #define parse_partitions(info, dev) (0) #endif /* MTD_PARTITIONS */ -static int of_shark_flash_remove(struct of_device *dev) +static int of_shark_flash_remove(struct platform_device *dev) { struct of_flash *info; @@ -184,10 +185,10 @@ static int of_shark_flash_remove(struct of_device *dev) /* Helper function to handle probing of the obsolete "direct-mapped" * compatible binding, which has an extra "probe-type" property * describing the type of flash probe necessary. */ -static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, +static struct mtd_info * __devinit obsolete_probe(struct platform_device *dev, struct map_info *map) { - struct device_node *dp = dev->node; + struct device_node *dp = dev->dev.of_node; const char *of_probe; struct mtd_info *mtd; static const char *rom_probe_types[] @@ -217,14 +218,14 @@ static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, } } -static int __devinit of_shark_flash_probe(struct of_device *dev, +static int __devinit of_shark_flash_probe(struct platform_device *dev, const struct of_device_id *match) { #ifdef CONFIG_MTD_PARTITIONS static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; #endif - struct device_node *dp = dev->node; + struct device_node *dp = dev->dev.of_node; struct device_node *np_sys; struct resource res; struct of_flash *info; @@ -367,8 +368,12 @@ static struct of_device_id of_shark_flash_match[] = { MODULE_DEVICE_TABLE(of, of_flash_match); static struct of_platform_driver of_shark_flash_driver = { - .name = "of-flash", - .match_table = of_shark_flash_match, + .driver = { + .name = "of-flash", + .owner = THIS_MODULE, + .of_match_table = of_shark_flash_match, + + }, .probe = of_shark_flash_probe, .remove = of_shark_flash_remove, }; diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index f0d5652723f..63cdcd0a6b1 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -1404,7 +1405,7 @@ mpc52xx_uart_of_probe(struct platform_device *op, const struct of_device_id *mat private_data = (struct mpc52xx_private_data *) kzalloc(sizeof(struct mpc52xx_private_data), GFP_KERNEL); if (private_data) { - port_mode = of_get_property(op->node, "uart_mode", &port_mode_len); + port_mode = of_get_property(op->dev.of_node, "uart_mode", &port_mode_len); if (port_mode) { if (strcmp(port_mode, "RS-485") == 0) { private_data->mode = 1; -- 2.39.2