diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 04:18:06 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-30 16:34:32 -0400 |
commit | d20d5a5780a014bc4d24dbcb6daf7673a9dddf98 (patch) | |
tree | 0ae7a1c94032860d72a57af83a435eb776b5e70f /drivers/mtd/maps | |
parent | 0278fd3fa34fb029e40224dd83d2628254f45481 (diff) |
mtd: maps: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r-- | drivers/mtd/maps/bfin-async-flash.c | 2 | ||||
-rw-r--r-- | drivers/mtd/maps/gpio-addr-flash.c | 2 | ||||
-rw-r--r-- | drivers/mtd/maps/ixp4xx.c | 4 | ||||
-rw-r--r-- | drivers/mtd/maps/latch-addr-flash.c | 4 | ||||
-rw-r--r-- | drivers/mtd/maps/physmap.c | 6 | ||||
-rw-r--r-- | drivers/mtd/maps/plat-ram.c | 4 | ||||
-rw-r--r-- | drivers/mtd/maps/pxa2xx-flash.c | 2 | ||||
-rw-r--r-- | drivers/mtd/maps/rbtx4939-flash.c | 4 | ||||
-rw-r--r-- | drivers/mtd/maps/sa1100-flash.c | 4 |
9 files changed, 16 insertions, 16 deletions
diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c index 319b04a6c9d1..5434d8ded015 100644 --- a/drivers/mtd/maps/bfin-async-flash.c +++ b/drivers/mtd/maps/bfin-async-flash.c | |||
@@ -128,7 +128,7 @@ static const char * const part_probe_types[] = { | |||
128 | static int bfin_flash_probe(struct platform_device *pdev) | 128 | static int bfin_flash_probe(struct platform_device *pdev) |
129 | { | 129 | { |
130 | int ret; | 130 | int ret; |
131 | struct physmap_flash_data *pdata = pdev->dev.platform_data; | 131 | struct physmap_flash_data *pdata = dev_get_platdata(&pdev->dev); |
132 | struct resource *memory = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 132 | struct resource *memory = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
133 | struct resource *flash_ambctl = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 133 | struct resource *flash_ambctl = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
134 | struct async_state *state; | 134 | struct async_state *state; |
diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c index 5ede28294f9e..1adba86474a5 100644 --- a/drivers/mtd/maps/gpio-addr-flash.c +++ b/drivers/mtd/maps/gpio-addr-flash.c | |||
@@ -196,7 +196,7 @@ static int gpio_flash_probe(struct platform_device *pdev) | |||
196 | struct resource *gpios; | 196 | struct resource *gpios; |
197 | struct async_state *state; | 197 | struct async_state *state; |
198 | 198 | ||
199 | pdata = pdev->dev.platform_data; | 199 | pdata = dev_get_platdata(&pdev->dev); |
200 | memory = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 200 | memory = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
201 | gpios = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 201 | gpios = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
202 | 202 | ||
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index 09c542b3a7f0..10debfea81e7 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c | |||
@@ -152,7 +152,7 @@ static const char * const probes[] = { "RedBoot", "cmdlinepart", NULL }; | |||
152 | 152 | ||
153 | static int ixp4xx_flash_remove(struct platform_device *dev) | 153 | static int ixp4xx_flash_remove(struct platform_device *dev) |
154 | { | 154 | { |
155 | struct flash_platform_data *plat = dev->dev.platform_data; | 155 | struct flash_platform_data *plat = dev_get_platdata(&dev->dev); |
156 | struct ixp4xx_flash_info *info = platform_get_drvdata(dev); | 156 | struct ixp4xx_flash_info *info = platform_get_drvdata(dev); |
157 | 157 | ||
158 | if(!info) | 158 | if(!info) |
@@ -178,7 +178,7 @@ static int ixp4xx_flash_remove(struct platform_device *dev) | |||
178 | 178 | ||
179 | static int ixp4xx_flash_probe(struct platform_device *dev) | 179 | static int ixp4xx_flash_probe(struct platform_device *dev) |
180 | { | 180 | { |
181 | struct flash_platform_data *plat = dev->dev.platform_data; | 181 | struct flash_platform_data *plat = dev_get_platdata(&dev->dev); |
182 | struct ixp4xx_flash_info *info; | 182 | struct ixp4xx_flash_info *info; |
183 | struct mtd_part_parser_data ppdata = { | 183 | struct mtd_part_parser_data ppdata = { |
184 | .origin = dev->resource->start, | 184 | .origin = dev->resource->start, |
diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c index 675ccb8c3cd9..98bb5d5375d7 100644 --- a/drivers/mtd/maps/latch-addr-flash.c +++ b/drivers/mtd/maps/latch-addr-flash.c | |||
@@ -103,7 +103,7 @@ static int latch_addr_flash_remove(struct platform_device *dev) | |||
103 | if (info == NULL) | 103 | if (info == NULL) |
104 | return 0; | 104 | return 0; |
105 | 105 | ||
106 | latch_addr_data = dev->dev.platform_data; | 106 | latch_addr_data = dev_get_platdata(&dev->dev); |
107 | 107 | ||
108 | if (info->mtd != NULL) { | 108 | if (info->mtd != NULL) { |
109 | mtd_device_unregister(info->mtd); | 109 | mtd_device_unregister(info->mtd); |
@@ -134,7 +134,7 @@ static int latch_addr_flash_probe(struct platform_device *dev) | |||
134 | int chipsel; | 134 | int chipsel; |
135 | int err; | 135 | int err; |
136 | 136 | ||
137 | latch_addr_data = dev->dev.platform_data; | 137 | latch_addr_data = dev_get_platdata(&dev->dev); |
138 | if (latch_addr_data == NULL) | 138 | if (latch_addr_data == NULL) |
139 | return -ENODEV; | 139 | return -ENODEV; |
140 | 140 | ||
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index 9eb7ead97f34..f73cd461257c 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c | |||
@@ -41,7 +41,7 @@ static int physmap_flash_remove(struct platform_device *dev) | |||
41 | if (info == NULL) | 41 | if (info == NULL) |
42 | return 0; | 42 | return 0; |
43 | 43 | ||
44 | physmap_data = dev->dev.platform_data; | 44 | physmap_data = dev_get_platdata(&dev->dev); |
45 | 45 | ||
46 | if (info->cmtd) { | 46 | if (info->cmtd) { |
47 | mtd_device_unregister(info->cmtd); | 47 | mtd_device_unregister(info->cmtd); |
@@ -68,7 +68,7 @@ static void physmap_set_vpp(struct map_info *map, int state) | |||
68 | unsigned long flags; | 68 | unsigned long flags; |
69 | 69 | ||
70 | pdev = (struct platform_device *)map->map_priv_1; | 70 | pdev = (struct platform_device *)map->map_priv_1; |
71 | physmap_data = pdev->dev.platform_data; | 71 | physmap_data = dev_get_platdata(&pdev->dev); |
72 | 72 | ||
73 | if (!physmap_data->set_vpp) | 73 | if (!physmap_data->set_vpp) |
74 | return; | 74 | return; |
@@ -102,7 +102,7 @@ static int physmap_flash_probe(struct platform_device *dev) | |||
102 | int i; | 102 | int i; |
103 | int devices_found = 0; | 103 | int devices_found = 0; |
104 | 104 | ||
105 | physmap_data = dev->dev.platform_data; | 105 | physmap_data = dev_get_platdata(&dev->dev); |
106 | if (physmap_data == NULL) | 106 | if (physmap_data == NULL) |
107 | return -ENODEV; | 107 | return -ENODEV; |
108 | 108 | ||
diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c index b0b85ebaef05..676271659b37 100644 --- a/drivers/mtd/maps/plat-ram.c +++ b/drivers/mtd/maps/plat-ram.c | |||
@@ -128,13 +128,13 @@ static int platram_probe(struct platform_device *pdev) | |||
128 | 128 | ||
129 | dev_dbg(&pdev->dev, "probe entered\n"); | 129 | dev_dbg(&pdev->dev, "probe entered\n"); |
130 | 130 | ||
131 | if (pdev->dev.platform_data == NULL) { | 131 | if (dev_get_platdata(&pdev->dev) == NULL) { |
132 | dev_err(&pdev->dev, "no platform data supplied\n"); | 132 | dev_err(&pdev->dev, "no platform data supplied\n"); |
133 | err = -ENOENT; | 133 | err = -ENOENT; |
134 | goto exit_error; | 134 | goto exit_error; |
135 | } | 135 | } |
136 | 136 | ||
137 | pdata = pdev->dev.platform_data; | 137 | pdata = dev_get_platdata(&pdev->dev); |
138 | 138 | ||
139 | info = kzalloc(sizeof(*info), GFP_KERNEL); | 139 | info = kzalloc(sizeof(*info), GFP_KERNEL); |
140 | if (info == NULL) { | 140 | if (info == NULL) { |
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c index 22c55cbf3168..d210d131fef2 100644 --- a/drivers/mtd/maps/pxa2xx-flash.c +++ b/drivers/mtd/maps/pxa2xx-flash.c | |||
@@ -49,7 +49,7 @@ static const char * const probes[] = { "RedBoot", "cmdlinepart", NULL }; | |||
49 | 49 | ||
50 | static int pxa2xx_flash_probe(struct platform_device *pdev) | 50 | static int pxa2xx_flash_probe(struct platform_device *pdev) |
51 | { | 51 | { |
52 | struct flash_platform_data *flash = pdev->dev.platform_data; | 52 | struct flash_platform_data *flash = dev_get_platdata(&pdev->dev); |
53 | struct pxa2xx_flash_info *info; | 53 | struct pxa2xx_flash_info *info; |
54 | struct resource *res; | 54 | struct resource *res; |
55 | 55 | ||
diff --git a/drivers/mtd/maps/rbtx4939-flash.c b/drivers/mtd/maps/rbtx4939-flash.c index ab4ec5544025..93525121d69d 100644 --- a/drivers/mtd/maps/rbtx4939-flash.c +++ b/drivers/mtd/maps/rbtx4939-flash.c | |||
@@ -36,7 +36,7 @@ static int rbtx4939_flash_remove(struct platform_device *dev) | |||
36 | return 0; | 36 | return 0; |
37 | 37 | ||
38 | if (info->mtd) { | 38 | if (info->mtd) { |
39 | struct rbtx4939_flash_data *pdata = dev->dev.platform_data; | 39 | struct rbtx4939_flash_data *pdata = dev_get_platdata(&dev->dev); |
40 | 40 | ||
41 | mtd_device_unregister(info->mtd); | 41 | mtd_device_unregister(info->mtd); |
42 | map_destroy(info->mtd); | 42 | map_destroy(info->mtd); |
@@ -56,7 +56,7 @@ static int rbtx4939_flash_probe(struct platform_device *dev) | |||
56 | int err = 0; | 56 | int err = 0; |
57 | unsigned long size; | 57 | unsigned long size; |
58 | 58 | ||
59 | pdata = dev->dev.platform_data; | 59 | pdata = dev_get_platdata(&dev->dev); |
60 | if (!pdata) | 60 | if (!pdata) |
61 | return -ENODEV; | 61 | return -ENODEV; |
62 | 62 | ||
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c index 9e70f8e714b1..8fc06bf111c4 100644 --- a/drivers/mtd/maps/sa1100-flash.c +++ b/drivers/mtd/maps/sa1100-flash.c | |||
@@ -248,7 +248,7 @@ static const char * const part_probes[] = { "cmdlinepart", "RedBoot", NULL }; | |||
248 | 248 | ||
249 | static int sa1100_mtd_probe(struct platform_device *pdev) | 249 | static int sa1100_mtd_probe(struct platform_device *pdev) |
250 | { | 250 | { |
251 | struct flash_platform_data *plat = pdev->dev.platform_data; | 251 | struct flash_platform_data *plat = dev_get_platdata(&pdev->dev); |
252 | struct sa_info *info; | 252 | struct sa_info *info; |
253 | int err; | 253 | int err; |
254 | 254 | ||
@@ -277,7 +277,7 @@ static int sa1100_mtd_probe(struct platform_device *pdev) | |||
277 | static int __exit sa1100_mtd_remove(struct platform_device *pdev) | 277 | static int __exit sa1100_mtd_remove(struct platform_device *pdev) |
278 | { | 278 | { |
279 | struct sa_info *info = platform_get_drvdata(pdev); | 279 | struct sa_info *info = platform_get_drvdata(pdev); |
280 | struct flash_platform_data *plat = pdev->dev.platform_data; | 280 | struct flash_platform_data *plat = dev_get_platdata(&pdev->dev); |
281 | 281 | ||
282 | sa1100_destroy(info, plat); | 282 | sa1100_destroy(info, plat); |
283 | 283 | ||