Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
1464d8c7
Commit
1464d8c7
authored
Mar 12, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i2c: i2c-piix4.c: Clean up the ibm dma scan logic
Also export the is_unsafe_smbus variable, which is needed.
parent
48ff60a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
18 deletions
+5
-18
arch/i386/kernel/dmi_scan.c
arch/i386/kernel/dmi_scan.c
+3
-0
drivers/i2c/busses/i2c-piix4.c
drivers/i2c/busses/i2c-piix4.c
+2
-18
No files found.
arch/i386/kernel/dmi_scan.c
View file @
1464d8c7
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/apm_bios.h>
#include <linux/apm_bios.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <asm/io.h>
#include <asm/io.h>
...
@@ -893,3 +894,5 @@ void __init dmi_scan_machine(void)
...
@@ -893,3 +894,5 @@ void __init dmi_scan_machine(void)
if
(
err
==
0
)
if
(
err
==
0
)
dmi_check_blacklist
();
dmi_check_blacklist
();
}
}
EXPORT_SYMBOL
(
is_unsafe_smbus
);
drivers/i2c/busses/i2c-piix4.c
View file @
1464d8c7
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
Note: we assume there can only be one device, with one SMBus interface.
Note: we assume there can only be one device, with one SMBus interface.
*/
*/
#include <linux/version.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/config.h>
#include <linux/config.h>
#include <linux/pci.h>
#include <linux/pci.h>
...
@@ -104,31 +103,18 @@ static int piix4_transaction(void);
...
@@ -104,31 +103,18 @@ static int piix4_transaction(void);
static
unsigned
short
piix4_smba
=
0
;
static
unsigned
short
piix4_smba
=
0
;
#ifdef CONFIG_X86
/*
/*
* Get DMI information.
* Get DMI information.
*/
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,34)
static
int
ibm_dmi_probe
(
void
)
void
dmi_scan_mach
(
void
);
#endif
static
int
__init
ibm_dmi_probe
(
void
)
{
{
#if
LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,34)
#if
def CONFIG_X86
extern
int
is_unsafe_smbus
;
extern
int
is_unsafe_smbus
;
return
is_unsafe_smbus
;
return
is_unsafe_smbus
;
#else
#else
#define IBM_SIGNATURE "IBM"
dmi_scan_mach
();
if
(
dmi_ident
[
DMI_SYS_VENDOR
]
==
NULL
)
return
0
;
if
(
strncmp
(
dmi_ident
[
DMI_SYS_VENDOR
],
IBM_SIGNATURE
,
strlen
(
IBM_SIGNATURE
))
==
0
)
return
1
;
return
0
;
return
0
;
#endif
#endif
}
}
#endif
static
int
piix4_setup
(
struct
pci_dev
*
PIIX4_dev
,
const
struct
pci_device_id
*
id
)
static
int
piix4_setup
(
struct
pci_dev
*
PIIX4_dev
,
const
struct
pci_device_id
*
id
)
{
{
...
@@ -141,7 +127,6 @@ static int piix4_setup(struct pci_dev *PIIX4_dev, const struct pci_device_id *id
...
@@ -141,7 +127,6 @@ static int piix4_setup(struct pci_dev *PIIX4_dev, const struct pci_device_id *id
printk
(
KERN_INFO
"i2c-piix4.o: Found %s device
\n
"
,
PIIX4_dev
->
dev
.
name
);
printk
(
KERN_INFO
"i2c-piix4.o: Found %s device
\n
"
,
PIIX4_dev
->
dev
.
name
);
#ifdef CONFIG_X86
if
(
ibm_dmi_probe
())
{
if
(
ibm_dmi_probe
())
{
printk
printk
(
KERN_ERR
"i2c-piix4.o: IBM Laptop detected; this module may corrupt
\n
"
);
(
KERN_ERR
"i2c-piix4.o: IBM Laptop detected; this module may corrupt
\n
"
);
...
@@ -150,7 +135,6 @@ static int piix4_setup(struct pci_dev *PIIX4_dev, const struct pci_device_id *id
...
@@ -150,7 +135,6 @@ static int piix4_setup(struct pci_dev *PIIX4_dev, const struct pci_device_id *id
error_return
=
-
EPERM
;
error_return
=
-
EPERM
;
goto
END
;
goto
END
;
}
}
#endif
/* Determine the address of the SMBus areas */
/* Determine the address of the SMBus areas */
if
(
force_addr
)
{
if
(
force_addr
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment