aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/asic3.c
diff options
context:
space:
mode:
authorPaul Parsons <lost.distance@yahoo.com>2012-04-09 08:18:31 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-05-01 06:00:22 -0400
commit4f304245bb6cfa665ff21b12c059499eafa8b725 (patch)
tree9fb3bb9bd632e1a49c6a14e36e6f8ce2e049a795 /drivers/mfd/asic3.c
parente1277f45d8748ff59608b140780f75390cb5400c (diff)
mfd: Set asic3 DS1WM clock_rate
The mfd/asic3 driver does not set the ds1wm_driver_data clock_rate field before passing the structure to the DS1WM w1 busmaster driver. This was not noticed before commit 26a6afb, because ds1wm_find_divisor() unintentionally returned the correct divisor when a zero clock_rate was passed in. However after that commit DS1WM fails a zero clock_rate: ds1wm ds1wm: no suitable divisor for 0Hz clock This patch sets the ds1wm_driver_data clock_rate field. Signed-off-by: Paul Parsons <lost.distance@yahoo.com> Acked-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/asic3.c')
-rw-r--r--drivers/mfd/asic3.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index f75dc6733f49..4c3ec8113e7e 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -894,10 +894,13 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
894 asic3_mmc_resources[0].start >>= asic->bus_shift; 894 asic3_mmc_resources[0].start >>= asic->bus_shift;
895 asic3_mmc_resources[0].end >>= asic->bus_shift; 895 asic3_mmc_resources[0].end >>= asic->bus_shift;
896 896
897 ret = mfd_add_devices(&pdev->dev, pdev->id, 897 if (pdata->clock_rate) {
898 ds1wm_pdata.clock_rate = pdata->clock_rate;
899 ret = mfd_add_devices(&pdev->dev, pdev->id,
898 &asic3_cell_ds1wm, 1, mem, asic->irq_base); 900 &asic3_cell_ds1wm, 1, mem, asic->irq_base);
899 if (ret < 0) 901 if (ret < 0)
900 goto out; 902 goto out;
903 }
901 904
902 if (mem_sdio && (irq >= 0)) { 905 if (mem_sdio && (irq >= 0)) {
903 ret = mfd_add_devices(&pdev->dev, pdev->id, 906 ret = mfd_add_devices(&pdev->dev, pdev->id,