diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2008-02-15 23:17:54 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-16 00:33:59 -0500 |
commit | d7c1d17dfed996e84212fc1ce617b2586dd70ec2 (patch) | |
tree | 0e98a00d767c2bc9342b5a7bc941d1d20f2b4a9d /drivers/misc/thinkpad_acpi.c | |
parent | 7526696a013f33d4926fdc080c26fe6af07ba30f (diff) |
ACPI: thinkpad-acpi: make the video output feature optional
The video output port control feature is not very useful on many ThinkPads
(especially when a X server is running), and lately userspace is getting
better and better at it, so it makes sense to allow users to stripe out the
thinkpad-acpi video feature from their kernels and save at least 2KB.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc/thinkpad_acpi.c')
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 02f946516584..4ea3866ddf90 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -301,6 +301,13 @@ TPACPI_HANDLE(hkey, ec, "\\_SB.HKEY", /* 600e/x, 770e, 770x */ | |||
301 | "HKEY", /* all others */ | 301 | "HKEY", /* all others */ |
302 | ); /* 570 */ | 302 | ); /* 570 */ |
303 | 303 | ||
304 | TPACPI_HANDLE(vid, root, "\\_SB.PCI.AGP.VGA", /* 570 */ | ||
305 | "\\_SB.PCI0.AGP0.VID0", /* 600e/x, 770x */ | ||
306 | "\\_SB.PCI0.VID0", /* 770e */ | ||
307 | "\\_SB.PCI0.VID", /* A21e, G4x, R50e, X30, X40 */ | ||
308 | "\\_SB.PCI0.AGP.VID", /* all others */ | ||
309 | ); /* R30, R31 */ | ||
310 | |||
304 | 311 | ||
305 | /************************************************************************* | 312 | /************************************************************************* |
306 | * ACPI helpers | 313 | * ACPI helpers |
@@ -2680,6 +2687,8 @@ static struct ibm_struct wan_driver_data = { | |||
2680 | * Video subdriver | 2687 | * Video subdriver |
2681 | */ | 2688 | */ |
2682 | 2689 | ||
2690 | #ifdef CONFIG_THINKPAD_ACPI_VIDEO | ||
2691 | |||
2683 | enum video_access_mode { | 2692 | enum video_access_mode { |
2684 | TPACPI_VIDEO_NONE = 0, | 2693 | TPACPI_VIDEO_NONE = 0, |
2685 | TPACPI_VIDEO_570, /* 570 */ | 2694 | TPACPI_VIDEO_570, /* 570 */ |
@@ -2707,13 +2716,6 @@ static int video_orig_autosw; | |||
2707 | static int video_autosw_get(void); | 2716 | static int video_autosw_get(void); |
2708 | static int video_autosw_set(int enable); | 2717 | static int video_autosw_set(int enable); |
2709 | 2718 | ||
2710 | TPACPI_HANDLE(vid, root, "\\_SB.PCI.AGP.VGA", /* 570 */ | ||
2711 | "\\_SB.PCI0.AGP0.VID0", /* 600e/x, 770x */ | ||
2712 | "\\_SB.PCI0.VID0", /* 770e */ | ||
2713 | "\\_SB.PCI0.VID", /* A21e, G4x, R50e, X30, X40 */ | ||
2714 | "\\_SB.PCI0.AGP.VID", /* all others */ | ||
2715 | ); /* R30, R31 */ | ||
2716 | |||
2717 | TPACPI_HANDLE(vid2, root, "\\_SB.PCI0.AGPB.VID"); /* G41 */ | 2719 | TPACPI_HANDLE(vid2, root, "\\_SB.PCI0.AGPB.VID"); /* G41 */ |
2718 | 2720 | ||
2719 | static int __init video_init(struct ibm_init_struct *iibm) | 2721 | static int __init video_init(struct ibm_init_struct *iibm) |
@@ -3023,6 +3025,8 @@ static struct ibm_struct video_driver_data = { | |||
3023 | .exit = video_exit, | 3025 | .exit = video_exit, |
3024 | }; | 3026 | }; |
3025 | 3027 | ||
3028 | #endif /* CONFIG_THINKPAD_ACPI_VIDEO */ | ||
3029 | |||
3026 | /************************************************************************* | 3030 | /************************************************************************* |
3027 | * Light (thinklight) subdriver | 3031 | * Light (thinklight) subdriver |
3028 | */ | 3032 | */ |
@@ -5807,10 +5811,12 @@ static struct ibm_init_struct ibms_init[] __initdata = { | |||
5807 | .init = wan_init, | 5811 | .init = wan_init, |
5808 | .data = &wan_driver_data, | 5812 | .data = &wan_driver_data, |
5809 | }, | 5813 | }, |
5814 | #ifdef CONFIG_THINKPAD_ACPI_VIDEO | ||
5810 | { | 5815 | { |
5811 | .init = video_init, | 5816 | .init = video_init, |
5812 | .data = &video_driver_data, | 5817 | .data = &video_driver_data, |
5813 | }, | 5818 | }, |
5819 | #endif | ||
5814 | { | 5820 | { |
5815 | .init = light_init, | 5821 | .init = light_init, |
5816 | .data = &light_driver_data, | 5822 | .data = &light_driver_data, |