aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-03-25 11:41:20 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-03-25 11:41:20 -0400
commit7bf7e370d5919112c223a269462cd0b546903829 (patch)
tree03ccc715239df14ae168277dbccc9d9cf4d8a2c8 /drivers/w1
parent68b1a1e786f29c900fa1c516a402e24f0ece622a (diff)
parentd39dd11c3e6a7af5c20bfac40594db36cf270f42 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus-1
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (9356 commits) [media] rc: update for bitop name changes fs: simplify iget & friends fs: pull inode->i_lock up out of writeback_single_inode fs: rename inode_lock to inode_hash_lock fs: move i_wb_list out from under inode_lock fs: move i_sb_list out from under inode_lock fs: remove inode_lock from iput_final and prune_icache fs: Lock the inode LRU list separately fs: factor inode disposal fs: protect inode->i_state with inode->i_lock lib, arch: add filter argument to show_mem and fix private implementations SLUB: Write to per cpu data when allocating it slub: Fix debugobjects with lockless fastpath autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd() autofs4 - remove autofs4_lock autofs4 - fix d_manage() return on rcu-walk autofs4 - fix autofs4_expire_indirect() traversal autofs4 - fix dentry leak in autofs4_expire_direct() autofs4 - reinstate last used update on access vfs - check non-mountpoint dentry might block in __follow_mount_rcu() ... NOTE! This merge commit was created to fix compilation error. The block tree was merged upstream and removed the 'elv_queue_empty()' function which the new 'mtdswap' driver is using. So a simple merge of the mtd tree with upstream does not compile. And the mtd tree has already be published, so re-basing it is not an option. To fix this unfortunate situation, I had to merge upstream into the mtd-2.6.git tree without committing, put the fixup patch on top of this, and then commit this. The result is that we do not have commits which do not compile. In other words, this merge commit "merges" 3 things: the MTD tree, the upstream tree, and the fixup patch.
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/masters/Kconfig2
-rw-r--r--drivers/w1/masters/ds1wm.c13
-rw-r--r--drivers/w1/masters/omap_hdq.c28
3 files changed, 19 insertions, 24 deletions
diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
index 80b3b123dd7f..7c608c5ccf84 100644
--- a/drivers/w1/masters/Kconfig
+++ b/drivers/w1/masters/Kconfig
@@ -60,7 +60,7 @@ config W1_MASTER_GPIO
60 60
61config HDQ_MASTER_OMAP 61config HDQ_MASTER_OMAP
62 tristate "OMAP HDQ driver" 62 tristate "OMAP HDQ driver"
63 depends on ARCH_OMAP2430 || ARCH_OMAP3 63 depends on SOC_OMAP2430 || ARCH_OMAP3
64 help 64 help
65 Say Y here if you want support for the 1-wire or HDQ Interface 65 Say Y here if you want support for the 1-wire or HDQ Interface
66 on an OMAP processor. 66 on an OMAP processor.
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c
index 6b85e7fefa43..95921b77cf86 100644
--- a/drivers/w1/masters/ds1wm.c
+++ b/drivers/w1/masters/ds1wm.c
@@ -90,7 +90,7 @@ struct ds1wm_data {
90 void __iomem *map; 90 void __iomem *map;
91 int bus_shift; /* # of shifts to calc register offsets */ 91 int bus_shift; /* # of shifts to calc register offsets */
92 struct platform_device *pdev; 92 struct platform_device *pdev;
93 struct mfd_cell *cell; 93 const struct mfd_cell *cell;
94 int irq; 94 int irq;
95 int active_high; 95 int active_high;
96 int slave_present; 96 int slave_present;
@@ -216,7 +216,7 @@ static int ds1wm_find_divisor(int gclk)
216static void ds1wm_up(struct ds1wm_data *ds1wm_data) 216static void ds1wm_up(struct ds1wm_data *ds1wm_data)
217{ 217{
218 int divisor; 218 int divisor;
219 struct ds1wm_driver_data *plat = ds1wm_data->cell->driver_data; 219 struct ds1wm_driver_data *plat = mfd_get_data(ds1wm_data->pdev);
220 220
221 if (ds1wm_data->cell->enable) 221 if (ds1wm_data->cell->enable)
222 ds1wm_data->cell->enable(ds1wm_data->pdev); 222 ds1wm_data->cell->enable(ds1wm_data->pdev);
@@ -330,16 +330,11 @@ static int ds1wm_probe(struct platform_device *pdev)
330 struct ds1wm_data *ds1wm_data; 330 struct ds1wm_data *ds1wm_data;
331 struct ds1wm_driver_data *plat; 331 struct ds1wm_driver_data *plat;
332 struct resource *res; 332 struct resource *res;
333 struct mfd_cell *cell;
334 int ret; 333 int ret;
335 334
336 if (!pdev) 335 if (!pdev)
337 return -ENODEV; 336 return -ENODEV;
338 337
339 cell = pdev->dev.platform_data;
340 if (!cell)
341 return -ENODEV;
342
343 ds1wm_data = kzalloc(sizeof(*ds1wm_data), GFP_KERNEL); 338 ds1wm_data = kzalloc(sizeof(*ds1wm_data), GFP_KERNEL);
344 if (!ds1wm_data) 339 if (!ds1wm_data)
345 return -ENOMEM; 340 return -ENOMEM;
@@ -356,13 +351,13 @@ static int ds1wm_probe(struct platform_device *pdev)
356 ret = -ENOMEM; 351 ret = -ENOMEM;
357 goto err0; 352 goto err0;
358 } 353 }
359 plat = cell->driver_data; 354 plat = mfd_get_data(pdev);
360 355
361 /* calculate bus shift from mem resource */ 356 /* calculate bus shift from mem resource */
362 ds1wm_data->bus_shift = resource_size(res) >> 3; 357 ds1wm_data->bus_shift = resource_size(res) >> 3;
363 358
364 ds1wm_data->pdev = pdev; 359 ds1wm_data->pdev = pdev;
365 ds1wm_data->cell = cell; 360 ds1wm_data->cell = mfd_get_cell(pdev);
366 361
367 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 362 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
368 if (!res) { 363 if (!res) {
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index 3a7e9ff8a746..38e96ab90945 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -593,19 +593,17 @@ static int __devinit omap_hdq_probe(struct platform_device *pdev)
593 593
594 /* get interface & functional clock objects */ 594 /* get interface & functional clock objects */
595 hdq_data->hdq_ick = clk_get(&pdev->dev, "ick"); 595 hdq_data->hdq_ick = clk_get(&pdev->dev, "ick");
596 hdq_data->hdq_fck = clk_get(&pdev->dev, "fck"); 596 if (IS_ERR(hdq_data->hdq_ick)) {
597 dev_dbg(&pdev->dev, "Can't get HDQ ick clock object\n");
598 ret = PTR_ERR(hdq_data->hdq_ick);
599 goto err_ick;
600 }
597 601
598 if (IS_ERR(hdq_data->hdq_ick) || IS_ERR(hdq_data->hdq_fck)) { 602 hdq_data->hdq_fck = clk_get(&pdev->dev, "fck");
599 dev_dbg(&pdev->dev, "Can't get HDQ clock objects\n"); 603 if (IS_ERR(hdq_data->hdq_fck)) {
600 if (IS_ERR(hdq_data->hdq_ick)) { 604 dev_dbg(&pdev->dev, "Can't get HDQ fck clock object\n");
601 ret = PTR_ERR(hdq_data->hdq_ick); 605 ret = PTR_ERR(hdq_data->hdq_fck);
602 goto err_clk; 606 goto err_fck;
603 }
604 if (IS_ERR(hdq_data->hdq_fck)) {
605 ret = PTR_ERR(hdq_data->hdq_fck);
606 clk_put(hdq_data->hdq_ick);
607 goto err_clk;
608 }
609 } 607 }
610 608
611 hdq_data->hdq_usecount = 0; 609 hdq_data->hdq_usecount = 0;
@@ -665,10 +663,12 @@ err_fnclk:
665 clk_disable(hdq_data->hdq_ick); 663 clk_disable(hdq_data->hdq_ick);
666 664
667err_intfclk: 665err_intfclk:
668 clk_put(hdq_data->hdq_ick);
669 clk_put(hdq_data->hdq_fck); 666 clk_put(hdq_data->hdq_fck);
670 667
671err_clk: 668err_fck:
669 clk_put(hdq_data->hdq_ick);
670
671err_ick:
672 iounmap(hdq_data->hdq_base); 672 iounmap(hdq_data->hdq_base);
673 673
674err_ioremap: 674err_ioremap: