diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2019-04-03 08:56:58 -0400 |
---|---|---|
committer | Noralf Trønnes <noralf@tronnes.org> | 2019-04-11 10:14:49 -0400 |
commit | e33898a20744de9c98cbb7d38506734ece824cb4 (patch) | |
tree | 1f9ded2a6e02bed89e61c1137e0c5a1c0e7115a2 | |
parent | 564d6fd611f9c66dba4a3ad1da7a4589f8eb699a (diff) |
drm/client: Rename drm_client_add() to drm_client_register()
This is done to stay consistent with our naming scheme of
_register() = others can start calling us from any thread.
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190403125658.32389-1-noralf@tronnes.org
-rw-r--r-- | drivers/gpu/drm/drm_client.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 2 | ||||
-rw-r--r-- | include/drm/drm_client.h | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index 9b2bd28dde0a..f20d1dda3961 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c | |||
@@ -69,7 +69,8 @@ EXPORT_SYMBOL(drm_client_close); | |||
69 | * @name: Client name | 69 | * @name: Client name |
70 | * @funcs: DRM client functions (optional) | 70 | * @funcs: DRM client functions (optional) |
71 | * | 71 | * |
72 | * This initialises the client and opens a &drm_file. Use drm_client_add() to complete the process. | 72 | * This initialises the client and opens a &drm_file. |
73 | * Use drm_client_register() to complete the process. | ||
73 | * The caller needs to hold a reference on @dev before calling this function. | 74 | * The caller needs to hold a reference on @dev before calling this function. |
74 | * The client is freed when the &drm_device is unregistered. See drm_client_release(). | 75 | * The client is freed when the &drm_device is unregistered. See drm_client_release(). |
75 | * | 76 | * |
@@ -108,16 +109,16 @@ err_put_module: | |||
108 | EXPORT_SYMBOL(drm_client_init); | 109 | EXPORT_SYMBOL(drm_client_init); |
109 | 110 | ||
110 | /** | 111 | /** |
111 | * drm_client_add - Add client to the device list | 112 | * drm_client_register - Register client |
112 | * @client: DRM client | 113 | * @client: DRM client |
113 | * | 114 | * |
114 | * Add the client to the &drm_device client list to activate its callbacks. | 115 | * Add the client to the &drm_device client list to activate its callbacks. |
115 | * @client must be initialized by a call to drm_client_init(). After | 116 | * @client must be initialized by a call to drm_client_init(). After |
116 | * drm_client_add() it is no longer permissible to call drm_client_release() | 117 | * drm_client_register() it is no longer permissible to call drm_client_release() |
117 | * directly (outside the unregister callback), instead cleanup will happen | 118 | * directly (outside the unregister callback), instead cleanup will happen |
118 | * automatically on driver unload. | 119 | * automatically on driver unload. |
119 | */ | 120 | */ |
120 | void drm_client_add(struct drm_client_dev *client) | 121 | void drm_client_register(struct drm_client_dev *client) |
121 | { | 122 | { |
122 | struct drm_device *dev = client->dev; | 123 | struct drm_device *dev = client->dev; |
123 | 124 | ||
@@ -125,7 +126,7 @@ void drm_client_add(struct drm_client_dev *client) | |||
125 | list_add(&client->list, &dev->clientlist); | 126 | list_add(&client->list, &dev->clientlist); |
126 | mutex_unlock(&dev->clientlist_mutex); | 127 | mutex_unlock(&dev->clientlist_mutex); |
127 | } | 128 | } |
128 | EXPORT_SYMBOL(drm_client_add); | 129 | EXPORT_SYMBOL(drm_client_register); |
129 | 130 | ||
130 | /** | 131 | /** |
131 | * drm_client_release - Release DRM client resources | 132 | * drm_client_release - Release DRM client resources |
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 84791dd4a90d..367641c7754f 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
@@ -3322,7 +3322,7 @@ int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp) | |||
3322 | if (ret) | 3322 | if (ret) |
3323 | DRM_DEV_DEBUG(dev->dev, "client hotplug ret=%d\n", ret); | 3323 | DRM_DEV_DEBUG(dev->dev, "client hotplug ret=%d\n", ret); |
3324 | 3324 | ||
3325 | drm_client_add(&fb_helper->client); | 3325 | drm_client_register(&fb_helper->client); |
3326 | 3326 | ||
3327 | return 0; | 3327 | return 0; |
3328 | } | 3328 | } |
diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h index 8b552b1a6ce9..268b2cf0052a 100644 --- a/include/drm/drm_client.h +++ b/include/drm/drm_client.h | |||
@@ -90,7 +90,7 @@ struct drm_client_dev { | |||
90 | int drm_client_init(struct drm_device *dev, struct drm_client_dev *client, | 90 | int drm_client_init(struct drm_device *dev, struct drm_client_dev *client, |
91 | const char *name, const struct drm_client_funcs *funcs); | 91 | const char *name, const struct drm_client_funcs *funcs); |
92 | void drm_client_release(struct drm_client_dev *client); | 92 | void drm_client_release(struct drm_client_dev *client); |
93 | void drm_client_add(struct drm_client_dev *client); | 93 | void drm_client_register(struct drm_client_dev *client); |
94 | 94 | ||
95 | void drm_client_dev_unregister(struct drm_device *dev); | 95 | void drm_client_dev_unregister(struct drm_device *dev); |
96 | void drm_client_dev_hotplug(struct drm_device *dev); | 96 | void drm_client_dev_hotplug(struct drm_device *dev); |