-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,76 @@ | ||
/* | ||
* Samsung N130 Laptop Backlight driver | ||
* | ||
* Copyright (C) 2009 Greg Kroah-Hartman (gregkh@suse.de) | ||
* Copyright (C) 2009 Novell Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 2 as published by | ||
* the Free Software Foundation. | ||
* | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/init.h> | ||
#include <linux/module.h> | ||
#include <linux/pci.h> | ||
|
||
static struct pci_dev *device; | ||
|
||
static struct pci_device_id samsung_ids[] = { | ||
{ PCI_DEVICE(0x8086, 0x27ae) }, | ||
{ }, | ||
}; | ||
MODULE_DEVICE_TABLE(pci, samsung_ids); | ||
|
||
static int probe(struct pci_dev *pci_dev, const struct pci_device_id *id) | ||
{ | ||
return -ENODEV; | ||
} | ||
|
||
static int __init gotemp_init(void) | ||
static void remove(struct pci_dev *pci_dev) | ||
{ | ||
printk(KERN_INFO "Hello from the kernel!\n"); | ||
} | ||
|
||
static struct pci_driver samsung_driver = { | ||
.name = "samsung-backlight", | ||
.id_table = samsung_ids, | ||
.probe = probe, | ||
.remove = remove, | ||
}; | ||
|
||
|
||
static int find_video_card(void) | ||
{ | ||
|
||
return 0; | ||
} | ||
|
||
static void __exit gotemp_exit(void) | ||
static void remove_video_card(void) | ||
{ | ||
if (!device) | ||
return; | ||
} | ||
|
||
static int __init samsung_init(void) | ||
{ | ||
int retval; | ||
retval = pci_register_driver(&samsung_driver); | ||
if (retval) | ||
return retval; | ||
|
||
return find_video_card(); | ||
} | ||
|
||
static void __exit samsung_exit(void) | ||
{ | ||
pci_unregister_driver(&samsung_driver); | ||
remove_video_card(); | ||
} | ||
|
||
module_init(gotemp_init); | ||
module_exit(gotemp_exit); | ||
module_init(samsung_init); | ||
module_exit(samsung_exit); | ||
|
||
MODULE_AUTHOR("My name here"); | ||
MODULE_DESCRIPTION("Simple driver"); | ||
MODULE_AUTHOR("Greg Kroah-Hartman <gregkh@suse.de>"); | ||
MODULE_DESCRIPTION("Samsung N130 Backlight driver"); | ||
MODULE_LICENSE("GPL"); |