Print version on load

common-wmi
Lekensteyn 13 years ago
parent 11ddd3469f
commit 7fd02221b2

@ -1,6 +1,6 @@
modname := bbswitch modname := bbswitch
DKMS := dkms DKMS := dkms
modver := $(shell awk -F'"' '/MODULE_VERSION/{print $$2}' < bbswitch.c) modver := $(shell awk -F'"' '/define *BBSWITCH_VERSION/{print $$2}' < bbswitch.c)
# directory in which generated files are stored # directory in which generated files are stored
DKMS_DEST := /usr/src/$(modname)-$(modver) DKMS_DEST := /usr/src/$(modname)-$(modver)

@ -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;

Loading…
Cancel
Save