diff options
Diffstat (limited to 'drivers/media/video/atmel-isi.c')
-rw-r--r-- | drivers/media/video/atmel-isi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/video/atmel-isi.c b/drivers/media/video/atmel-isi.c index 9fe4519176a4..ec3f6a06f9c3 100644 --- a/drivers/media/video/atmel-isi.c +++ b/drivers/media/video/atmel-isi.c | |||
@@ -922,7 +922,9 @@ static int __devexit atmel_isi_remove(struct platform_device *pdev) | |||
922 | isi->fb_descriptors_phys); | 922 | isi->fb_descriptors_phys); |
923 | 923 | ||
924 | iounmap(isi->regs); | 924 | iounmap(isi->regs); |
925 | clk_unprepare(isi->mck); | ||
925 | clk_put(isi->mck); | 926 | clk_put(isi->mck); |
927 | clk_unprepare(isi->pclk); | ||
926 | clk_put(isi->pclk); | 928 | clk_put(isi->pclk); |
927 | kfree(isi); | 929 | kfree(isi); |
928 | 930 | ||
@@ -955,6 +957,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev) | |||
955 | if (IS_ERR(pclk)) | 957 | if (IS_ERR(pclk)) |
956 | return PTR_ERR(pclk); | 958 | return PTR_ERR(pclk); |
957 | 959 | ||
960 | ret = clk_prepare(pclk); | ||
961 | if (ret) | ||
962 | goto err_clk_prepare_pclk; | ||
963 | |||
958 | isi = kzalloc(sizeof(struct atmel_isi), GFP_KERNEL); | 964 | isi = kzalloc(sizeof(struct atmel_isi), GFP_KERNEL); |
959 | if (!isi) { | 965 | if (!isi) { |
960 | ret = -ENOMEM; | 966 | ret = -ENOMEM; |
@@ -978,6 +984,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev) | |||
978 | goto err_clk_get; | 984 | goto err_clk_get; |
979 | } | 985 | } |
980 | 986 | ||
987 | ret = clk_prepare(isi->mck); | ||
988 | if (ret) | ||
989 | goto err_clk_prepare_mck; | ||
990 | |||
981 | /* Set ISI_MCK's frequency, it should be faster than pixel clock */ | 991 | /* Set ISI_MCK's frequency, it should be faster than pixel clock */ |
982 | ret = clk_set_rate(isi->mck, pdata->mck_hz); | 992 | ret = clk_set_rate(isi->mck, pdata->mck_hz); |
983 | if (ret < 0) | 993 | if (ret < 0) |
@@ -1059,10 +1069,14 @@ err_alloc_ctx: | |||
1059 | isi->fb_descriptors_phys); | 1069 | isi->fb_descriptors_phys); |
1060 | err_alloc_descriptors: | 1070 | err_alloc_descriptors: |
1061 | err_set_mck_rate: | 1071 | err_set_mck_rate: |
1072 | clk_unprepare(isi->mck); | ||
1073 | err_clk_prepare_mck: | ||
1062 | clk_put(isi->mck); | 1074 | clk_put(isi->mck); |
1063 | err_clk_get: | 1075 | err_clk_get: |
1064 | kfree(isi); | 1076 | kfree(isi); |
1065 | err_alloc_isi: | 1077 | err_alloc_isi: |
1078 | clk_unprepare(pclk); | ||
1079 | err_clk_prepare_pclk: | ||
1066 | clk_put(pclk); | 1080 | clk_put(pclk); |
1067 | 1081 | ||
1068 | return ret; | 1082 | return ret; |