Commit Graph

8 Commits

Author SHA1 Message Date
Miaoqian Lin d543ba3a61 phy: mediatek: Fix missing check in mtk_mipi_tx_probe
[ Upstream commit 399c91c3f3 ]

The of_device_get_match_data() function may return NULL.
Add check to prevent potential null dereference.

Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20211224082103.7658-1-linmq006@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 11:05:05 +01:00
Chunfeng Yun 7508d1e403 phy: phy-mtk-mipi-dsi: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource to simplify code

Acked-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1629191987-20774-9-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-08-17 15:51:59 +05:30
Chunfeng Yun 75203e7994 phy: phy-mtk-mipi-dsi: remove dummy assignment of error number
Return the error number directly without assignment

Acked-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1629191987-20774-8-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-08-17 15:51:59 +05:30
He Ying 779fabf2a0 phy: phy-mtk-mipi-dsi: Remove redundant dev_err call in mtk_mipi_tx_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: He Ying <heying24@huawei.com>
Link: https://lore.kernel.org/r/20210408114850.14422-1-heying24@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-06-14 11:00:52 +05:30
Greg Kroah-Hartman 8e94114a40 phy: second round of phy fixes for v5.11
- rockchip: init return and vednor prefix to dt-property
  - cpcap: bool conversion fix
  - lantiq: clock enable fix
  - lgm: kconfig depends on x86
  - mediatek: add mising MODULE_DEVICE_TABLE()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmAdMRgACgkQfBQHDyUj
 g0d0ag//RkMES7RoXcmaa2oAwNvRmX6PC04JjJnHJ8xlvOe/GQoRGhdH7oeXvPCv
 OeoOV0yfAa62AI5Vho+GF9xc31nWsus/UtH+VoxiqAZWLOx2xzKpFAPl1BVvIAHR
 V9msLtFwIAkb/wcB7coU5jGJKTdSwroFRpWLJcVJjNzzV8FKfZ+mpJm0tszyHRYq
 ohpkiQl2RmOjM3KmAQJ/F6z3f+ctXJz2fjwzKT0viza5Y78TTUllZwqrVWUxViGh
 iCyIKHHpRTIv1q2e0kxAIV1Q4z10Yt7+5cyFtEHDWU/LT7EuyG3LW65xcWi0Li7b
 LS+wgKEzS6Q39uTjruEdH5Neq5LdqkHcaOkEQDIDN33zHWbNeVgR3b5QNcg7cvA6
 wp54YLZqa2NE75ec8jJ4LfguzYn48e3Qkvd63VviXJfYZ0QQfWQErLiRe97IWV1Q
 vW+Gvg1SQOa6oR++tVMe2qHy7hU/jCEJRBHGxlYMNj2yXSvvAgW5KRO4gC1YFswW
 +O+csDHRct/peskD5sT0gnOfoE0O92FZ7bYAwi5KnpwCat5z0j7SodiyOqEZlJyw
 Kvv9UX+aAj9S6UBEHb8sf9xzqi4dK+iSrubqb+47Nfuzxy/ZnywfN1NWtHKadHfd
 pSg5gOQs4v2wAzd0LJItWqle3bAPfs8GciK3cDH/6LLKyQSqNhc=
 =/v7w
 -----END PGP SIGNATURE-----

Merge tag 'phy-fixes2-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-next

Vinod writes:

phy: second round of phy fixes for v5.11

 - rockchip: init return and vednor prefix to dt-property
 - cpcap: bool conversion fix
 - lantiq: clock enable fix
 - lgm: kconfig depends on x86
 - mediatek: add mising MODULE_DEVICE_TABLE()

* tag 'phy-fixes2-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
  phy: mediatek: Add missing MODULE_DEVICE_TABLE()
  phy: phy-brcm-sata: remove unneeded semicolon
  phy: USB_LGM_PHY should depend on X86
  phy: lantiq: rcu-usb2: wait after clock enable
  phy: rockchip: emmc, add vendor prefix to dts properties
  devicetree: phy: rockchip-emmc optional add vendor prefix
  phy: cpcap-usb: remove unneeded conversion to bool
  phy: rockchip-emmc: emmc_phy_init() always return 0
2021-02-10 10:39:23 +01:00
Boris Brezillon 9a8b9434c6 phy: mediatek: Add missing MODULE_DEVICE_TABLE()
This patch adds the missing MODULE_DEVICE_TABLE definitions on different
Mediatek phy drivers which generates correct modalias for automatic loading
when these drivers are compiled as an external module.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20210203110631.686003-1-enric.balletbo@collabora.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-02-04 13:37:37 +05:30
Zou Wei 6d54623a56 phy: mediatek: Mark mtk_mipi_tx_driver with static keyword
Fix the following sparse warning:

drivers/phy/mediatek/phy-mtk-mipi-dsi.c:237:24: warning: symbol 'mtk_mipi_tx_driver' was not declared. Should it be static?

Signed-off-by: Zou Wei <zou_wei@huawei.com>
Link: https://lore.kernel.org/r/1610415484-92497-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-01-13 19:44:07 +05:30
Chun-Kuang Hu 90f80d9599 phy: mediatek: Move mtk_mipi_dsi_phy driver into drivers/phy/mediatek folder
mtk_mipi_dsi_phy is currently placed inside mediatek drm driver, but it's
more suitable to place a phy driver into phy driver folder, so move
mtk_mipi_dsi_phy driver into phy driver folder.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
2020-11-30 23:42:40 +08:00