Commit 2dea2d11 authored by Pankaj Bharadiya's avatar Pankaj Bharadiya Committed by Daniel Vetter

drm: Remove unused arg from drm_fb_helper_init

The max connector argument for drm_fb_helper_init() isn't used anymore
hence remove it.

All the drm_fb_helper_init() calls are modified with below sementic
patch.

@@
expression E1, E2, E3;
@@
-  drm_fb_helper_init(E1,E2, E3)
+  drm_fb_helper_init(E1,E2)
Signed-off-by: default avatarPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200305120434.111091-2-pankaj.laxminarayan.bharadiya@intel.com
parent 0be38b10
...@@ -336,8 +336,7 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev) ...@@ -336,8 +336,7 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev)
drm_fb_helper_prepare(adev->ddev, &rfbdev->helper, drm_fb_helper_prepare(adev->ddev, &rfbdev->helper,
&amdgpu_fb_helper_funcs); &amdgpu_fb_helper_funcs);
ret = drm_fb_helper_init(adev->ddev, &rfbdev->helper, ret = drm_fb_helper_init(adev->ddev, &rfbdev->helper);
AMDGPUFB_CONN_LIMIT);
if (ret) { if (ret) {
kfree(rfbdev); kfree(rfbdev);
return ret; return ret;
......
...@@ -129,7 +129,7 @@ int armada_fbdev_init(struct drm_device *dev) ...@@ -129,7 +129,7 @@ int armada_fbdev_init(struct drm_device *dev)
drm_fb_helper_prepare(dev, fbh, &armada_fb_helper_funcs); drm_fb_helper_prepare(dev, fbh, &armada_fb_helper_funcs);
ret = drm_fb_helper_init(dev, fbh, 1); ret = drm_fb_helper_init(dev, fbh);
if (ret) { if (ret) {
DRM_ERROR("failed to initialize drm fb helper\n"); DRM_ERROR("failed to initialize drm fb helper\n");
goto err_fb_helper; goto err_fb_helper;
......
...@@ -450,7 +450,6 @@ EXPORT_SYMBOL(drm_fb_helper_prepare); ...@@ -450,7 +450,6 @@ EXPORT_SYMBOL(drm_fb_helper_prepare);
* drm_fb_helper_init - initialize a &struct drm_fb_helper * drm_fb_helper_init - initialize a &struct drm_fb_helper
* @dev: drm device * @dev: drm device
* @fb_helper: driver-allocated fbdev helper structure to initialize * @fb_helper: driver-allocated fbdev helper structure to initialize
* @max_conn_count: max connector count (not used)
* *
* This allocates the structures for the fbdev helper with the given limits. * This allocates the structures for the fbdev helper with the given limits.
* Note that this won't yet touch the hardware (through the driver interfaces) * Note that this won't yet touch the hardware (through the driver interfaces)
...@@ -463,8 +462,7 @@ EXPORT_SYMBOL(drm_fb_helper_prepare); ...@@ -463,8 +462,7 @@ EXPORT_SYMBOL(drm_fb_helper_prepare);
* Zero if everything went ok, nonzero otherwise. * Zero if everything went ok, nonzero otherwise.
*/ */
int drm_fb_helper_init(struct drm_device *dev, int drm_fb_helper_init(struct drm_device *dev,
struct drm_fb_helper *fb_helper, struct drm_fb_helper *fb_helper)
int max_conn_count)
{ {
int ret; int ret;
...@@ -2125,7 +2123,7 @@ static int drm_fbdev_client_hotplug(struct drm_client_dev *client) ...@@ -2125,7 +2123,7 @@ static int drm_fbdev_client_hotplug(struct drm_client_dev *client)
drm_fb_helper_prepare(dev, fb_helper, &drm_fb_helper_generic_funcs); drm_fb_helper_prepare(dev, fb_helper, &drm_fb_helper_generic_funcs);
ret = drm_fb_helper_init(dev, fb_helper, 0); ret = drm_fb_helper_init(dev, fb_helper);
if (ret) if (ret)
goto err; goto err;
......
...@@ -200,7 +200,7 @@ int exynos_drm_fbdev_init(struct drm_device *dev) ...@@ -200,7 +200,7 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
drm_fb_helper_prepare(dev, helper, &exynos_drm_fb_helper_funcs); drm_fb_helper_prepare(dev, helper, &exynos_drm_fb_helper_funcs);
ret = drm_fb_helper_init(dev, helper, MAX_CONNECTOR); ret = drm_fb_helper_init(dev, helper);
if (ret < 0) { if (ret < 0) {
DRM_DEV_ERROR(dev->dev, DRM_DEV_ERROR(dev->dev,
"failed to initialize drm fb helper.\n"); "failed to initialize drm fb helper.\n");
......
...@@ -513,7 +513,7 @@ int psb_fbdev_init(struct drm_device *dev) ...@@ -513,7 +513,7 @@ int psb_fbdev_init(struct drm_device *dev)
drm_fb_helper_prepare(dev, fb_helper, &psb_fb_helper_funcs); drm_fb_helper_prepare(dev, fb_helper, &psb_fb_helper_funcs);
ret = drm_fb_helper_init(dev, fb_helper, INTELFB_CONN_LIMIT); ret = drm_fb_helper_init(dev, fb_helper);
if (ret) if (ret)
goto free; goto free;
......
...@@ -453,7 +453,7 @@ int intel_fbdev_init(struct drm_device *dev) ...@@ -453,7 +453,7 @@ int intel_fbdev_init(struct drm_device *dev)
if (!intel_fbdev_init_bios(dev, ifbdev)) if (!intel_fbdev_init_bios(dev, ifbdev))
ifbdev->preferred_bpp = 32; ifbdev->preferred_bpp = 32;
ret = drm_fb_helper_init(dev, &ifbdev->helper, 4); ret = drm_fb_helper_init(dev, &ifbdev->helper);
if (ret) { if (ret) {
kfree(ifbdev); kfree(ifbdev);
return ret; return ret;
......
...@@ -160,7 +160,7 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev) ...@@ -160,7 +160,7 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
drm_fb_helper_prepare(dev, helper, &msm_fb_helper_funcs); drm_fb_helper_prepare(dev, helper, &msm_fb_helper_funcs);
ret = drm_fb_helper_init(dev, helper, priv->num_connectors); ret = drm_fb_helper_init(dev, helper);
if (ret) { if (ret) {
DRM_DEV_ERROR(dev->dev, "could not init fbdev: ret=%d\n", ret); DRM_DEV_ERROR(dev->dev, "could not init fbdev: ret=%d\n", ret);
goto fail; goto fail;
......
...@@ -558,7 +558,7 @@ nouveau_fbcon_init(struct drm_device *dev) ...@@ -558,7 +558,7 @@ nouveau_fbcon_init(struct drm_device *dev)
drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs); drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs);
ret = drm_fb_helper_init(dev, &fbcon->helper, 4); ret = drm_fb_helper_init(dev, &fbcon->helper);
if (ret) if (ret)
goto free; goto free;
......
...@@ -242,7 +242,7 @@ void omap_fbdev_init(struct drm_device *dev) ...@@ -242,7 +242,7 @@ void omap_fbdev_init(struct drm_device *dev)
drm_fb_helper_prepare(dev, helper, &omap_fb_helper_funcs); drm_fb_helper_prepare(dev, helper, &omap_fb_helper_funcs);
ret = drm_fb_helper_init(dev, helper, priv->num_pipes); ret = drm_fb_helper_init(dev, helper);
if (ret) if (ret)
goto fail; goto fail;
......
...@@ -354,8 +354,7 @@ int radeon_fbdev_init(struct radeon_device *rdev) ...@@ -354,8 +354,7 @@ int radeon_fbdev_init(struct radeon_device *rdev)
drm_fb_helper_prepare(rdev->ddev, &rfbdev->helper, drm_fb_helper_prepare(rdev->ddev, &rfbdev->helper,
&radeon_fb_helper_funcs); &radeon_fb_helper_funcs);
ret = drm_fb_helper_init(rdev->ddev, &rfbdev->helper, ret = drm_fb_helper_init(rdev->ddev, &rfbdev->helper);
RADEONFB_CONN_LIMIT);
if (ret) if (ret)
goto free; goto free;
......
...@@ -124,7 +124,7 @@ int rockchip_drm_fbdev_init(struct drm_device *dev) ...@@ -124,7 +124,7 @@ int rockchip_drm_fbdev_init(struct drm_device *dev)
drm_fb_helper_prepare(dev, helper, &rockchip_drm_fb_helper_funcs); drm_fb_helper_prepare(dev, helper, &rockchip_drm_fb_helper_funcs);
ret = drm_fb_helper_init(dev, helper, ROCKCHIP_MAX_CONNECTOR); ret = drm_fb_helper_init(dev, helper);
if (ret < 0) { if (ret < 0) {
DRM_DEV_ERROR(dev->dev, DRM_DEV_ERROR(dev->dev,
"Failed to initialize drm fb helper - %d.\n", "Failed to initialize drm fb helper - %d.\n",
......
...@@ -314,7 +314,7 @@ static int tegra_fbdev_init(struct tegra_fbdev *fbdev, ...@@ -314,7 +314,7 @@ static int tegra_fbdev_init(struct tegra_fbdev *fbdev,
struct drm_device *drm = fbdev->base.dev; struct drm_device *drm = fbdev->base.dev;
int err; int err;
err = drm_fb_helper_init(drm, &fbdev->base, max_connectors); err = drm_fb_helper_init(drm, &fbdev->base);
if (err < 0) { if (err < 0) {
dev_err(drm->dev, "failed to initialize DRM FB helper: %d\n", dev_err(drm->dev, "failed to initialize DRM FB helper: %d\n",
err); err);
......
...@@ -213,8 +213,7 @@ drm_fb_helper_from_client(struct drm_client_dev *client) ...@@ -213,8 +213,7 @@ drm_fb_helper_from_client(struct drm_client_dev *client)
#ifdef CONFIG_DRM_FBDEV_EMULATION #ifdef CONFIG_DRM_FBDEV_EMULATION
void drm_fb_helper_prepare(struct drm_device *dev, struct drm_fb_helper *helper, void drm_fb_helper_prepare(struct drm_device *dev, struct drm_fb_helper *helper,
const struct drm_fb_helper_funcs *funcs); const struct drm_fb_helper_funcs *funcs);
int drm_fb_helper_init(struct drm_device *dev, int drm_fb_helper_init(struct drm_device *dev, struct drm_fb_helper *helper);
struct drm_fb_helper *helper, int max_conn);
void drm_fb_helper_fini(struct drm_fb_helper *helper); void drm_fb_helper_fini(struct drm_fb_helper *helper);
int drm_fb_helper_blank(int blank, struct fb_info *info); int drm_fb_helper_blank(int blank, struct fb_info *info);
int drm_fb_helper_pan_display(struct fb_var_screeninfo *var, int drm_fb_helper_pan_display(struct fb_var_screeninfo *var,
...@@ -279,8 +278,7 @@ static inline void drm_fb_helper_prepare(struct drm_device *dev, ...@@ -279,8 +278,7 @@ static inline void drm_fb_helper_prepare(struct drm_device *dev,
} }
static inline int drm_fb_helper_init(struct drm_device *dev, static inline int drm_fb_helper_init(struct drm_device *dev,
struct drm_fb_helper *helper, struct drm_fb_helper *helper)
int max_conn)
{ {
/* So drivers can use it to free the struct */ /* So drivers can use it to free the struct */
helper->dev = dev; helper->dev = dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment