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
nexedi
linux
Commits
27b727c8
Commit
27b727c8
authored
Oct 27, 2002
by
Adam J. Richter
Committed by
Linus Torvalds
Oct 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use pci_[gs]et_drvdata instead of directly referenced ->driver_data
in struct pci_dev.
parent
cb2af32e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
16 deletions
+16
-16
drivers/block/umem.c
drivers/block/umem.c
+2
-2
drivers/ide/pci/hpt366.c
drivers/ide/pci/hpt366.c
+5
-5
drivers/ide/pci/siimage.c
drivers/ide/pci/siimage.c
+4
-4
drivers/net/tokenring/3c359.c
drivers/net/tokenring/3c359.c
+1
-1
drivers/net/tulip/xircom_cb.c
drivers/net/tulip/xircom_cb.c
+2
-2
drivers/net/wan/pc300_drv.c
drivers/net/wan/pc300_drv.c
+2
-2
No files found.
drivers/block/umem.c
View file @
27b727c8
...
@@ -1041,7 +1041,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
...
@@ -1041,7 +1041,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
spin_lock_init
(
&
card
->
lock
);
spin_lock_init
(
&
card
->
lock
);
dev
->
driver_data
=
card
;
pci_set_drvdata
(
dev
,
card
)
;
if
(
pci_write_cmd
!=
0x0F
)
/* If not Memory Write & Invalidate */
if
(
pci_write_cmd
!=
0x0F
)
/* If not Memory Write & Invalidate */
pci_write_cmd
=
0x07
;
/* then Memory Write command */
pci_write_cmd
=
0x07
;
/* then Memory Write command */
...
@@ -1100,7 +1100,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
...
@@ -1100,7 +1100,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
*/
*/
static
void
mm_pci_remove
(
struct
pci_dev
*
dev
)
static
void
mm_pci_remove
(
struct
pci_dev
*
dev
)
{
{
struct
cardinfo
*
card
=
dev
->
driver_data
;
struct
cardinfo
*
card
=
pci_get_drvdata
(
dev
)
;
tasklet_kill
(
&
card
->
tasklet
);
tasklet_kill
(
&
card
->
tasklet
);
iounmap
(
card
->
csr_remap
);
iounmap
(
card
->
csr_remap
);
...
...
drivers/ide/pci/hpt366.c
View file @
27b727c8
...
@@ -316,7 +316,7 @@ static void hpt366_tune_chipset (ide_drive_t *drive, u8 xferspeed)
...
@@ -316,7 +316,7 @@ static void hpt366_tune_chipset (ide_drive_t *drive, u8 xferspeed)
#endif
#endif
reg2
=
pci_bus_clock_list
(
speed
,
reg2
=
pci_bus_clock_list
(
speed
,
(
struct
chipset_bus_clock_list_entry
*
)
dev
->
driver_data
);
(
struct
chipset_bus_clock_list_entry
*
)
pci_get_drvdata
(
dev
)
);
/*
/*
* Disable on-chip PIO FIFO/buffer
* Disable on-chip PIO FIFO/buffer
* (to avoid problems handling I/O errors later)
* (to avoid problems handling I/O errors later)
...
@@ -369,7 +369,7 @@ static void hpt370_tune_chipset (ide_drive_t *drive, u8 xferspeed)
...
@@ -369,7 +369,7 @@ static void hpt370_tune_chipset (ide_drive_t *drive, u8 xferspeed)
list_conf
=
pci_bus_clock_list
(
speed
,
list_conf
=
pci_bus_clock_list
(
speed
,
(
struct
chipset_bus_clock_list_entry
*
)
(
struct
chipset_bus_clock_list_entry
*
)
dev
->
driver_data
);
pci_get_drvdata
(
dev
)
);
pci_read_config_dword
(
dev
,
drive_pci
,
&
drive_conf
);
pci_read_config_dword
(
dev
,
drive_pci
,
&
drive_conf
);
list_conf
=
(
list_conf
&
~
conf_mask
)
|
(
drive_conf
&
conf_mask
);
list_conf
=
(
list_conf
&
~
conf_mask
)
|
(
drive_conf
&
conf_mask
);
...
@@ -401,7 +401,7 @@ static void hpt372_tune_chipset (ide_drive_t *drive, u8 xferspeed)
...
@@ -401,7 +401,7 @@ static void hpt372_tune_chipset (ide_drive_t *drive, u8 xferspeed)
list_conf
=
pci_bus_clock_list
(
speed
,
list_conf
=
pci_bus_clock_list
(
speed
,
(
struct
chipset_bus_clock_list_entry
*
)
(
struct
chipset_bus_clock_list_entry
*
)
dev
->
driver_data
);
pci_get_drvdata
(
dev
)
);
pci_read_config_dword
(
dev
,
drive_pci
,
&
drive_conf
);
pci_read_config_dword
(
dev
,
drive_pci
,
&
drive_conf
);
list_conf
=
(
list_conf
&
~
conf_mask
)
|
(
drive_conf
&
conf_mask
);
list_conf
=
(
list_conf
&
~
conf_mask
)
|
(
drive_conf
&
conf_mask
);
if
(
speed
<
XFER_MW_DMA_0
)
if
(
speed
<
XFER_MW_DMA_0
)
...
@@ -841,7 +841,7 @@ static int __init init_hpt37x(struct pci_dev *dev)
...
@@ -841,7 +841,7 @@ static int __init init_hpt37x(struct pci_dev *dev)
* don't like to use the PLL because it will cause glitches
* don't like to use the PLL because it will cause glitches
* on PRST/SRST when the HPT state engine gets reset.
* on PRST/SRST when the HPT state engine gets reset.
*/
*/
if
(
dev
->
driver_data
)
if
(
pci_get_drvdata
(
dev
)
)
goto
init_hpt37X_done
;
goto
init_hpt37X_done
;
/*
/*
...
@@ -923,7 +923,7 @@ static int __init init_hpt366 (struct pci_dev *dev)
...
@@ -923,7 +923,7 @@ static int __init init_hpt366 (struct pci_dev *dev)
break
;
break
;
}
}
if
(
!
dev
->
driver_data
)
if
(
!
pci_get_drvdata
(
dev
)
)
{
{
printk
(
KERN_ERR
"hpt366: unknown bus timing.
\n
"
);
printk
(
KERN_ERR
"hpt366: unknown bus timing.
\n
"
);
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
...
...
drivers/ide/pci/siimage.c
View file @
27b727c8
...
@@ -30,8 +30,8 @@ static int n_siimage_devs;
...
@@ -30,8 +30,8 @@ static int n_siimage_devs;
static
char
*
print_siimage_get_info
(
char
*
buf
,
struct
pci_dev
*
dev
,
int
index
)
static
char
*
print_siimage_get_info
(
char
*
buf
,
struct
pci_dev
*
dev
,
int
index
)
{
{
char
*
p
=
buf
;
char
*
p
=
buf
;
u8
mmio
=
(
dev
->
driver_data
!=
NULL
)
?
1
:
0
;
u8
mmio
=
(
pci_get_drvdata
(
dev
)
!=
NULL
)
?
1
:
0
;
u32
bmdma
=
(
mmio
)
?
((
u32
)
dev
->
driver_data
)
:
u32
bmdma
=
(
mmio
)
?
((
u32
)
pci_get_drvdata
(
dev
)
)
:
(
pci_resource_start
(
dev
,
4
));
(
pci_resource_start
(
dev
,
4
));
p
+=
sprintf
(
p
,
"
\n
Controller: %d
\n
"
,
index
);
p
+=
sprintf
(
p
,
"
\n
Controller: %d
\n
"
,
index
);
...
@@ -769,14 +769,14 @@ static void __init init_iops_siimage (ide_hwif_t *hwif)
...
@@ -769,14 +769,14 @@ static void __init init_iops_siimage (ide_hwif_t *hwif)
if
((
dev
->
device
==
PCI_DEVICE_ID_SII_3112
)
&&
(
!
(
class_rev
)))
if
((
dev
->
device
==
PCI_DEVICE_ID_SII_3112
)
&&
(
!
(
class_rev
)))
hwif
->
rqsize
=
16
;
hwif
->
rqsize
=
16
;
if
(
dev
->
driver_data
==
NULL
)
if
(
pci_get_drvdata
(
dev
)
==
NULL
)
return
;
return
;
init_mmio_iops_siimage
(
hwif
);
init_mmio_iops_siimage
(
hwif
);
}
}
static
unsigned
int
__init
ata66_siimage
(
ide_hwif_t
*
hwif
)
static
unsigned
int
__init
ata66_siimage
(
ide_hwif_t
*
hwif
)
{
{
if
(
hwif
->
pci_dev
->
driver_data
==
NULL
)
{
if
(
pci_get_drvdata
(
hwif
->
pci_dev
)
==
NULL
)
{
u8
ata66
=
0
;
u8
ata66
=
0
;
pci_read_config_byte
(
hwif
->
pci_dev
,
SELREG
(
0
),
&
ata66
);
pci_read_config_byte
(
hwif
->
pci_dev
,
SELREG
(
0
),
&
ata66
);
return
(
ata66
&
0x01
)
?
1
:
0
;
return
(
ata66
&
0x01
)
?
1
:
0
;
...
...
drivers/net/tokenring/3c359.c
View file @
27b727c8
...
@@ -1780,7 +1780,7 @@ static int xl_change_mtu(struct net_device *dev, int mtu)
...
@@ -1780,7 +1780,7 @@ static int xl_change_mtu(struct net_device *dev, int mtu)
static
void
__devexit
xl_remove_one
(
struct
pci_dev
*
pdev
)
static
void
__devexit
xl_remove_one
(
struct
pci_dev
*
pdev
)
{
{
struct
net_device
*
dev
=
p
dev
->
driver_data
;
struct
net_device
*
dev
=
p
ci_get_drvdata
(
pdev
)
;
struct
xl_private
*
xl_priv
=
(
struct
xl_private
*
)
dev
->
priv
;
struct
xl_private
*
xl_priv
=
(
struct
xl_private
*
)
dev
->
priv
;
unregister_trdev
(
dev
);
unregister_trdev
(
dev
);
...
...
drivers/net/tulip/xircom_cb.c
View file @
27b727c8
...
@@ -299,7 +299,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
...
@@ -299,7 +299,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
dev
->
get_stats
=
&
xircom_get_stats
;
dev
->
get_stats
=
&
xircom_get_stats
;
dev
->
priv
=
private
;
dev
->
priv
=
private
;
dev
->
do_ioctl
=
&
private_ioctl
;
dev
->
do_ioctl
=
&
private_ioctl
;
p
dev
->
driver_data
=
dev
;
p
ci_set_drvdata
(
pdev
,
dev
)
;
/* start the transmitter to get a heartbeat */
/* start the transmitter to get a heartbeat */
...
@@ -326,7 +326,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
...
@@ -326,7 +326,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
*/
*/
static
void
__devexit
xircom_remove
(
struct
pci_dev
*
pdev
)
static
void
__devexit
xircom_remove
(
struct
pci_dev
*
pdev
)
{
{
struct
net_device
*
dev
=
p
dev
->
driver_data
;
struct
net_device
*
dev
=
p
ci_get_drvdata
(
pdev
)
;
struct
xircom_private
*
card
;
struct
xircom_private
*
card
;
enter
(
"xircom_remove"
);
enter
(
"xircom_remove"
);
if
(
dev
!=
NULL
)
{
if
(
dev
!=
NULL
)
{
...
...
drivers/net/wan/pc300_drv.c
View file @
27b727c8
...
@@ -3556,7 +3556,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
...
@@ -3556,7 +3556,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
#endif
#endif
/* Set PCI drv pointer to the card structure */
/* Set PCI drv pointer to the card structure */
p
dev
->
driver_data
=
card
;
p
ci_set_drvdata
(
pdev
,
card
)
;
/* Set board type */
/* Set board type */
switch
(
device_id
)
{
switch
(
device_id
)
{
...
@@ -3631,7 +3631,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
...
@@ -3631,7 +3631,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
static
void
__devexit
cpc_remove_one
(
struct
pci_dev
*
pdev
)
static
void
__devexit
cpc_remove_one
(
struct
pci_dev
*
pdev
)
{
{
pc300_t
*
card
=
(
pc300_t
*
)
pdev
->
driver_data
;
pc300_t
*
card
=
pci_get_drvdata
(
pdev
)
;
if
(
card
->
hw
.
rambase
!=
0
)
{
if
(
card
->
hw
.
rambase
!=
0
)
{
int
i
;
int
i
;
...
...
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