Move prototype declarations of functions radeon_atom_get_tv_timings()
and radeon_atombios_connected_scratch_regs() to header file
drm/radeon/atombios.h because they are used by more than one file.

Include the header file in atombios_encoders.c, radeon_atombios.c and
radeon_connectors.c because they use the function whose prototype
declarations are present in it.

This eliminates the following warnings in drm/radeon/radeon_atombios.c:
drivers/gpu/drm/radeon/radeon_atombios.c:1766:6: warning: no previous prototype 
for ?radeon_atom_get_tv_timings? [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_atombios.c:4012:1: warning: no previous prototype 
for ?radeon_atombios_connected_scratch_regs? [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria at gmail.com>
Reviewed-by: Josh Triplett <josh at joshtriplett.org>
---
 drivers/gpu/drm/radeon/atombios.h          |    8 ++++++++
 drivers/gpu/drm/radeon/atombios_encoders.c |    6 +-----
 drivers/gpu/drm/radeon/radeon_atombios.c   |    1 +
 drivers/gpu/drm/radeon/radeon_connectors.c |    5 +----
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atombios.h 
b/drivers/gpu/drm/radeon/atombios.h
index 92be50c..72a3aa7c 100644
--- a/drivers/gpu/drm/radeon/atombios.h
+++ b/drivers/gpu/drm/radeon/atombios.h
@@ -193,6 +193,14 @@
 #define        OFFSET_TO_GET_ATOMBIOS_STRINGS_NUMBER           0x002f
 #define        OFFSET_TO_GET_ATOMBIOS_STRINGS_START            0x006e

+bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
+                               struct drm_display_mode *mode);
+void
+radeon_atombios_connected_scratch_regs(struct drm_connector *connector,
+                                      struct drm_encoder *encoder,
+                                      bool connected);
+
+
 /* Common header for all ROM Data tables.
   Every table pointed  _ATOM_MASTER_DATA_TABLE has this common header. 
   And the pointer actually points to this header. */
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c 
b/drivers/gpu/drm/radeon/atombios_encoders.c
index a42d615..641298d 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -28,6 +28,7 @@
 #include <drm/radeon_drm.h>
 #include "radeon.h"
 #include "atom.h"
+#include "atombios.h"
 #include <linux/backlight.h>

 extern int atom_debug;
@@ -283,11 +284,6 @@ static void radeon_atom_backlight_exit(struct 
radeon_encoder *encoder)

 #endif

-/* evil but including atombios.h is much worse */
-bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
-                               struct drm_display_mode *mode);
-
-
 static inline bool radeon_encoder_is_digital(struct drm_encoder *encoder)
 {
        struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c 
b/drivers/gpu/drm/radeon/radeon_atombios.c
index 5c39bf7..39f1fd6 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -28,6 +28,7 @@
 #include "radeon.h"

 #include "atom.h"
+#include "atombios.h"
 #include "atom-bits.h"

 /* from radeon_encoder.c */
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c 
b/drivers/gpu/drm/radeon/radeon_connectors.c
index 20a768a..9070487 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -30,6 +30,7 @@
 #include <drm/radeon_drm.h>
 #include "radeon.h"
 #include "atom.h"
+#include "atombios.h"

 #include <linux/pm_runtime.h>

@@ -37,10 +38,6 @@ extern void
 radeon_combios_connected_scratch_regs(struct drm_connector *connector,
                                      struct drm_encoder *encoder,
                                      bool connected);
-extern void
-radeon_atombios_connected_scratch_regs(struct drm_connector *connector,
-                                      struct drm_encoder *encoder,
-                                      bool connected);

 void radeon_connector_hotplug(struct drm_connector *connector)
 {
-- 
1.7.9.5

Reply via email to