Skip to content

Commit d57ba09

Browse files
arndbtursulin
authored andcommitted
drm/i915: make i915_drm_client_fdinfo() reference conditional again
The function is only defined if CONFIG_PROC_FS is enabled: ld.lld: error: undefined symbol: i915_drm_client_fdinfo >>> referenced by i915_driver.c >>> drivers/gpu/drm/i915/i915_driver.o:(i915_drm_driver) in archive vmlinux.a Use the PTR_IF() helper to make the reference NULL otherwise. Fixes: e894b72 ("drm/i915: Use the fdinfo helper") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: Tvrtko Ursulin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 8084c63) Signed-off-by: Tvrtko Ursulin <[email protected]>
1 parent cb359c6 commit d57ba09

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

drivers/gpu/drm/i915/i915_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,7 @@ static const struct drm_driver i915_drm_driver = {
18161816
.open = i915_driver_open,
18171817
.lastclose = i915_driver_lastclose,
18181818
.postclose = i915_driver_postclose,
1819-
.show_fdinfo = i915_drm_client_fdinfo,
1819+
.show_fdinfo = PTR_IF(IS_ENABLED(CONFIG_PROC_FS), i915_drm_client_fdinfo),
18201820

18211821
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
18221822
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,

drivers/gpu/drm/i915/i915_drm_client.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ static inline void i915_drm_client_put(struct i915_drm_client *client)
4747

4848
struct i915_drm_client *i915_drm_client_alloc(void);
4949

50-
#ifdef CONFIG_PROC_FS
5150
void i915_drm_client_fdinfo(struct drm_printer *p, struct drm_file *file);
52-
#endif
5351

5452
#endif /* !__I915_DRM_CLIENT_H__ */

0 commit comments

Comments
 (0)