|
|
@ -16,10 +16,12 @@
|
|
|
|
#include <linux/suspend.h>
|
|
|
|
#include <linux/suspend.h>
|
|
|
|
#include <linux/seq_file.h>
|
|
|
|
#include <linux/seq_file.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define BBSWITCH_VERSION "0.4.1"
|
|
|
|
|
|
|
|
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_DESCRIPTION("Toggle the discrete graphics card");
|
|
|
|
MODULE_DESCRIPTION("Toggle the discrete graphics card");
|
|
|
|
MODULE_AUTHOR("Peter Lekensteyn <lekensteyn@gmail.com>");
|
|
|
|
MODULE_AUTHOR("Peter Lekensteyn <lekensteyn@gmail.com>");
|
|
|
|
MODULE_VERSION("0.4.1");
|
|
|
|
MODULE_VERSION(BBSWITCH_VERSION);
|
|
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
enum {
|
|
|
|
CARD_UNCHANGED = -1,
|
|
|
|
CARD_UNCHANGED = -1,
|
|
|
@ -406,6 +408,8 @@ static int __init bbswitch_init(void) {
|
|
|
|
struct pci_dev *pdev = NULL;
|
|
|
|
struct pci_dev *pdev = NULL;
|
|
|
|
acpi_handle igd_handle = NULL;
|
|
|
|
acpi_handle igd_handle = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printk(KERN_INFO "bbswitch: version %s\n", BBSWITCH_VERSION);
|
|
|
|
|
|
|
|
|
|
|
|
while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
|
|
|
|
while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
|
|
|
|
struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL };
|
|
|
|
struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL };
|
|
|
|
acpi_handle handle;
|
|
|
|
acpi_handle handle;
|
|
|
|