aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.18/0111-BCM2708_VCIO-Add-automatic-creation-of-device-node.patch
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-02-11 10:17:55 +0000
committerJohn Crispin <blogic@openwrt.org>2015-02-11 10:17:55 +0000
commitc291f76d24a4190551a42b7b77a2cfeb3f4d36f9 (patch)
tree8f9211217d7e2cbaa78d10b596d81e646b3b9aad /target/linux/brcm2708/patches-3.18/0111-BCM2708_VCIO-Add-automatic-creation-of-device-node.patch
parent0e26998162921c65cbfe2814e500c81ca7b50dad (diff)
downloadmaster-187ad058-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.tar.gz
master-187ad058-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.tar.bz2
master-187ad058-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.zip
brcm2708: update to v3.18
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44392 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708/patches-3.18/0111-BCM2708_VCIO-Add-automatic-creation-of-device-node.patch')
-rwxr-xr-xtarget/linux/brcm2708/patches-3.18/0111-BCM2708_VCIO-Add-automatic-creation-of-device-node.patch87
1 files changed, 87 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.18/0111-BCM2708_VCIO-Add-automatic-creation-of-device-node.patch b/target/linux/brcm2708/patches-3.18/0111-BCM2708_VCIO-Add-automatic-creation-of-device-node.patch
new file mode 100755
index 0000000000..fc4897c05c
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.18/0111-BCM2708_VCIO-Add-automatic-creation-of-device-node.patch
@@ -0,0 +1,87 @@
+From 7fa07e9f8c88a5a628b9ca8a843d3490a59fb9cb Mon Sep 17 00:00:00 2001
+From: android <trevd1234@gmail.com>
+Date: Mon, 25 Aug 2014 13:18:21 +0100
+Subject: [PATCH 111/114] BCM2708_VCIO : Add automatic creation of device node
+
+---
+ arch/arm/mach-bcm2708/vcio.c | 12 +++++++++++-
+ arch/arm/mach-bcm2709/vcio.c | 12 +++++++++++-
+ 2 files changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-bcm2708/vcio.c b/arch/arm/mach-bcm2708/vcio.c
+index 5e43e85..700bff4 100644
+--- a/arch/arm/mach-bcm2708/vcio.c
++++ b/arch/arm/mach-bcm2708/vcio.c
+@@ -61,7 +61,7 @@
+ #define MBOX_DATA28_LSB(msg) (((uint32_t)msg) >> 4)
+
+ #define MBOX_MAGIC 0xd0d0c0de
+-
++static struct class *vcio_class = NULL;
+ struct vc_mailbox {
+ struct device *dev; /* parent device */
+ void __iomem *status;
+@@ -421,6 +421,13 @@ static int bcm_vcio_probe(struct platform_device *pdev)
+ "Failed registering the character device %d\n", ret);
+ return ret;
+ }
++ vcio_class = class_create(THIS_MODULE, BCM_VCIO_DRIVER_NAME);
++ if (IS_ERR(vcio_class)) {
++ ret = PTR_ERR(vcio_class);
++ return ret ;
++ }
++ device_create(vcio_class, NULL, MKDEV(MAJOR_NUM, 0), NULL,
++ "vcio");
+ }
+ return ret;
+ }
+@@ -462,6 +469,9 @@ static int __init bcm_mbox_init(void)
+
+ static void __exit bcm_mbox_exit(void)
+ {
++ device_destroy(vcio_class,MKDEV(MAJOR_NUM, 0));
++ class_destroy(vcio_class);
++ unregister_chrdev(MAJOR_NUM, DEVICE_FILE_NAME);
+ platform_driver_unregister(&bcm_mbox_driver);
+ }
+
+diff --git a/arch/arm/mach-bcm2709/vcio.c b/arch/arm/mach-bcm2709/vcio.c
+index 5e43e85..700bff4 100644
+--- a/arch/arm/mach-bcm2709/vcio.c
++++ b/arch/arm/mach-bcm2709/vcio.c
+@@ -61,7 +61,7 @@
+ #define MBOX_DATA28_LSB(msg) (((uint32_t)msg) >> 4)
+
+ #define MBOX_MAGIC 0xd0d0c0de
+-
++static struct class *vcio_class = NULL;
+ struct vc_mailbox {
+ struct device *dev; /* parent device */
+ void __iomem *status;
+@@ -421,6 +421,13 @@ static int bcm_vcio_probe(struct platform_device *pdev)
+ "Failed registering the character device %d\n", ret);
+ return ret;
+ }
++ vcio_class = class_create(THIS_MODULE, BCM_VCIO_DRIVER_NAME);
++ if (IS_ERR(vcio_class)) {
++ ret = PTR_ERR(vcio_class);
++ return ret ;
++ }
++ device_create(vcio_class, NULL, MKDEV(MAJOR_NUM, 0), NULL,
++ "vcio");
+ }
+ return ret;
+ }
+@@ -462,6 +469,9 @@ static int __init bcm_mbox_init(void)
+
+ static void __exit bcm_mbox_exit(void)
+ {
++ device_destroy(vcio_class,MKDEV(MAJOR_NUM, 0));
++ class_destroy(vcio_class);
++ unregister_chrdev(MAJOR_NUM, DEVICE_FILE_NAME);
+ platform_driver_unregister(&bcm_mbox_driver);
+ }
+
+--
+1.8.3.2
+