diff options
author | Jean Delvare <jdelvare@suse.de> | 2014-03-17 10:49:10 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-03-19 21:44:59 -0400 |
commit | f167a64e9d67ebd03d304e369c12011cf2bffaf5 (patch) | |
tree | 9a3968e986e373444032ca3777f281e7b85e4712 /drivers/video | |
parent | 782dd91c8761dc2ef9be28fbe7a812f4bad3c785 (diff) |
video / output: Drop display output class support
It was only ever used by the ACPI video driver, and that only use case
vanished over 3 years ago (see commit 677bd810, "ACPI video: remove
output switching control".) So this is dead code and I guess we can
remove it now.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/Kconfig | 6 | ||||
-rw-r--r-- | drivers/video/Makefile | 2 | ||||
-rw-r--r-- | drivers/video/output.c | 133 |
3 files changed, 0 insertions, 141 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index dade5b7699bc..97a8f3a12a7b 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -27,12 +27,6 @@ config VGASTATE | |||
27 | tristate | 27 | tristate |
28 | default n | 28 | default n |
29 | 29 | ||
30 | config VIDEO_OUTPUT_CONTROL | ||
31 | tristate "Lowlevel video output switch controls" | ||
32 | help | ||
33 | This framework adds support for low-level control of the video | ||
34 | output switch. | ||
35 | |||
36 | config VIDEOMODE_HELPERS | 30 | config VIDEOMODE_HELPERS |
37 | bool | 31 | bool |
38 | 32 | ||
diff --git a/drivers/video/Makefile b/drivers/video/Makefile index ae17ddf49a00..08d6a4ab3ace 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile | |||
@@ -172,8 +172,6 @@ obj-$(CONFIG_FB_SIMPLE) += simplefb.o | |||
172 | # the test framebuffer is last | 172 | # the test framebuffer is last |
173 | obj-$(CONFIG_FB_VIRTUAL) += vfb.o | 173 | obj-$(CONFIG_FB_VIRTUAL) += vfb.o |
174 | 174 | ||
175 | #video output switch sysfs driver | ||
176 | obj-$(CONFIG_VIDEO_OUTPUT_CONTROL) += output.o | ||
177 | obj-$(CONFIG_VIDEOMODE_HELPERS) += display_timing.o videomode.o | 175 | obj-$(CONFIG_VIDEOMODE_HELPERS) += display_timing.o videomode.o |
178 | ifeq ($(CONFIG_OF),y) | 176 | ifeq ($(CONFIG_OF),y) |
179 | obj-$(CONFIG_VIDEOMODE_HELPERS) += of_display_timing.o of_videomode.o | 177 | obj-$(CONFIG_VIDEOMODE_HELPERS) += of_display_timing.o of_videomode.o |
diff --git a/drivers/video/output.c b/drivers/video/output.c deleted file mode 100644 index 1446c49fe6af..000000000000 --- a/drivers/video/output.c +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | /* | ||
2 | * output.c - Display Output Switch driver | ||
3 | * | ||
4 | * Copyright (C) 2006 Luming Yu <luming.yu@intel.com> | ||
5 | * | ||
6 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or (at | ||
11 | * your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
21 | * | ||
22 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
23 | */ | ||
24 | #include <linux/module.h> | ||
25 | #include <linux/video_output.h> | ||
26 | #include <linux/slab.h> | ||
27 | #include <linux/err.h> | ||
28 | #include <linux/ctype.h> | ||
29 | |||
30 | |||
31 | MODULE_DESCRIPTION("Display Output Switcher Lowlevel Control Abstraction"); | ||
32 | MODULE_LICENSE("GPL"); | ||
33 | MODULE_AUTHOR("Luming Yu <luming.yu@intel.com>"); | ||
34 | |||
35 | static ssize_t state_show(struct device *dev, struct device_attribute *attr, | ||
36 | char *buf) | ||
37 | { | ||
38 | ssize_t ret_size = 0; | ||
39 | struct output_device *od = to_output_device(dev); | ||
40 | if (od->props) | ||
41 | ret_size = sprintf(buf,"%.8x\n",od->props->get_status(od)); | ||
42 | return ret_size; | ||
43 | } | ||
44 | |||
45 | static ssize_t state_store(struct device *dev, struct device_attribute *attr, | ||
46 | const char *buf,size_t count) | ||
47 | { | ||
48 | char *endp; | ||
49 | struct output_device *od = to_output_device(dev); | ||
50 | int request_state = simple_strtoul(buf,&endp,0); | ||
51 | size_t size = endp - buf; | ||
52 | |||
53 | if (isspace(*endp)) | ||
54 | size++; | ||
55 | if (size != count) | ||
56 | return -EINVAL; | ||
57 | |||
58 | if (od->props) { | ||
59 | od->request_state = request_state; | ||
60 | od->props->set_state(od); | ||
61 | } | ||
62 | return count; | ||
63 | } | ||
64 | static DEVICE_ATTR_RW(state); | ||
65 | |||
66 | static void video_output_release(struct device *dev) | ||
67 | { | ||
68 | struct output_device *od = to_output_device(dev); | ||
69 | kfree(od); | ||
70 | } | ||
71 | |||
72 | static struct attribute *video_output_attrs[] = { | ||
73 | &dev_attr_state.attr, | ||
74 | NULL, | ||
75 | }; | ||
76 | ATTRIBUTE_GROUPS(video_output); | ||
77 | |||
78 | static struct class video_output_class = { | ||
79 | .name = "video_output", | ||
80 | .dev_release = video_output_release, | ||
81 | .dev_groups = video_output_groups, | ||
82 | }; | ||
83 | |||
84 | struct output_device *video_output_register(const char *name, | ||
85 | struct device *dev, | ||
86 | void *devdata, | ||
87 | struct output_properties *op) | ||
88 | { | ||
89 | struct output_device *new_dev; | ||
90 | int ret_code = 0; | ||
91 | |||
92 | new_dev = kzalloc(sizeof(struct output_device),GFP_KERNEL); | ||
93 | if (!new_dev) { | ||
94 | ret_code = -ENOMEM; | ||
95 | goto error_return; | ||
96 | } | ||
97 | new_dev->props = op; | ||
98 | new_dev->dev.class = &video_output_class; | ||
99 | new_dev->dev.parent = dev; | ||
100 | dev_set_name(&new_dev->dev, "%s", name); | ||
101 | dev_set_drvdata(&new_dev->dev, devdata); | ||
102 | ret_code = device_register(&new_dev->dev); | ||
103 | if (ret_code) { | ||
104 | kfree(new_dev); | ||
105 | goto error_return; | ||
106 | } | ||
107 | return new_dev; | ||
108 | |||
109 | error_return: | ||
110 | return ERR_PTR(ret_code); | ||
111 | } | ||
112 | EXPORT_SYMBOL(video_output_register); | ||
113 | |||
114 | void video_output_unregister(struct output_device *dev) | ||
115 | { | ||
116 | if (!dev) | ||
117 | return; | ||
118 | device_unregister(&dev->dev); | ||
119 | } | ||
120 | EXPORT_SYMBOL(video_output_unregister); | ||
121 | |||
122 | static void __exit video_output_class_exit(void) | ||
123 | { | ||
124 | class_unregister(&video_output_class); | ||
125 | } | ||
126 | |||
127 | static int __init video_output_class_init(void) | ||
128 | { | ||
129 | return class_register(&video_output_class); | ||
130 | } | ||
131 | |||
132 | postcore_initcall(video_output_class_init); | ||
133 | module_exit(video_output_class_exit); | ||