summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/samsung.h
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2011-10-24 13:47:25 +0400
committerKukjin Kim <kgene.kim@samsung.com>2011-12-23 05:06:54 +0400
commit4d84e970d0faec772a9eaa818feee38aeca121b2 (patch)
tree40ae3a08e363625388ca0fa39591fb590b374bee /drivers/tty/serial/samsung.h
parent659d73ada5d6869dc18838c9125731a750389019 (diff)
downloadlinux-4d84e970d0faec772a9eaa818feee38aeca121b2.tar.xz
serial: samsung: Keep a copy of the location of platform data in driver's private data
Add a pointer to the location of the platform data in the driver's private data. When instantiated using device tree, pdev->dev->platform_data does not necessarily point to a valid instance of platform data. The platform data pointer in the driver's private data could be set to pdev->dev->platform_data or platform data instance created from device tree. Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/tty/serial/samsung.h')
-rw-r--r--drivers/tty/serial/samsung.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h
index 8e87b788e5c6..6c9cb9d5ccdb 100644
--- a/drivers/tty/serial/samsung.h
+++ b/drivers/tty/serial/samsung.h
@@ -48,6 +48,9 @@ struct s3c24xx_uart_port {
struct clk *baudclk;
struct uart_port port;
+ /* reference to platform data */
+ struct s3c2410_uartcfg *cfg;
+
#ifdef CONFIG_CPU_FREQ
struct notifier_block freq_transition;
#endif
@@ -56,7 +59,6 @@ struct s3c24xx_uart_port {
/* conversion functions */
#define s3c24xx_dev_to_port(__dev) (struct uart_port *)dev_get_drvdata(__dev)
-#define s3c24xx_dev_to_cfg(__dev) (struct s3c2410_uartcfg *)((__dev)->platform_data)
/* register access controls */