summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2015-04-30 21:28:31 +0200
committerpopcornmix <popcornmix@gmail.com>2015-05-18 14:13:03 +0100
commitd264726de205e268bbede3d035a482bcbd10de29 (patch)
tree1c500ce8af6935b163552633ea2bee168ef7eac3
parent62d6bea512fc18c556dc9165039a7b4f45f706d9 (diff)
downloadlinux-d264726de205e268bbede3d035a482bcbd10de29.tar.gz
BCM2708: vcio: Move some macros from header to driver
Move some macros that are only used by the driver: MAJOR_NUM IOCTL_MBOX_PROPERTY DEVICE_FILE_NAME This one becomes superfluous: BCM_VCIO_DRIVER_NAME Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
-rw-r--r--arch/arm/mach-bcm2708/include/mach/vcio.h35
-rw-r--r--arch/arm/mach-bcm2708/vcio.c9
2 files changed, 7 insertions, 37 deletions
diff --git a/arch/arm/mach-bcm2708/include/mach/vcio.h b/arch/arm/mach-bcm2708/include/mach/vcio.h
index 58188b7418c2..95ad1218002e 100644
--- a/arch/arm/mach-bcm2708/include/mach/vcio.h
+++ b/arch/arm/mach-bcm2708/include/mach/vcio.h
@@ -20,8 +20,6 @@
* (semaphores, doorbells, mailboxes)
*/
-#define BCM_VCIO_DRIVER_NAME "bcm2708_vcio"
-
/* Constants shared with the ARM identifying separate mailbox channels */
#define MBOX_CHAN_POWER 0 /* for use by the power management interface */
#define MBOX_CHAN_FB 1 /* for use by the frame buffer */
@@ -127,37 +125,4 @@ extern int /*rc*/ bcm_mailbox_read(unsigned chan, uint32_t *data28);
extern int /*rc*/ bcm_mailbox_write(unsigned chan, uint32_t data28);
extern int /*rc*/ bcm_mailbox_property(void *data, int size);
-#include <linux/ioctl.h>
-
-/*
- * The major device number. We can't rely on dynamic
- * registration any more, because ioctls need to know
- * it.
- */
-#define MAJOR_NUM 100
-
-/*
- * Set the message of the device driver
- */
-#define IOCTL_MBOX_PROPERTY _IOWR(MAJOR_NUM, 0, char *)
-/*
- * _IOWR means that we're creating an ioctl command
- * number for passing information from a user process
- * to the kernel module and from the kernel module to user process
- *
- * The first arguments, MAJOR_NUM, is the major device
- * number we're using.
- *
- * The second argument is the number of the command
- * (there could be several with different meanings).
- *
- * The third argument is the type we want to get from
- * the process to the kernel.
- */
-
-/*
- * The name of the device file
- */
-#define DEVICE_FILE_NAME "vcio"
-
#endif
diff --git a/arch/arm/mach-bcm2708/vcio.c b/arch/arm/mach-bcm2708/vcio.c
index 36e0f1e6ce45..75cf955f41b3 100644
--- a/arch/arm/mach-bcm2708/vcio.c
+++ b/arch/arm/mach-bcm2708/vcio.c
@@ -20,6 +20,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
+#include <linux/ioctl.h>
#include <linux/irq.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
@@ -28,7 +29,8 @@
#include <mach/vcio.h>
#include <mach/platform.h>
-#define DRIVER_NAME BCM_VCIO_DRIVER_NAME
+#define DRIVER_NAME "bcm2708_vcio"
+#define DEVICE_FILE_NAME "vcio"
/* offsets from a mail box base address */
#define MAIL_WRT 0x00 /* write - and next 4 words */
@@ -46,6 +48,9 @@
#define MBOX_MAGIC 0xd0d0c0de
+#define MAJOR_NUM 100
+#define IOCTL_MBOX_PROPERTY _IOWR(MAJOR_NUM, 0, char *)
+
static struct class *vcio_class;
struct vc_mailbox {
@@ -370,7 +375,7 @@ static int bcm_vcio_probe(struct platform_device *pdev)
ret);
return ret;
}
- vcio_class = class_create(THIS_MODULE, BCM_VCIO_DRIVER_NAME);
+ vcio_class = class_create(THIS_MODULE, DRIVER_NAME);
if (IS_ERR(vcio_class)) {
ret = PTR_ERR(vcio_class);
return ret;