Skip to content

Commit

Permalink
[PATCH] kill include/linux/eeprom.h
Browse files Browse the repository at this point in the history
This patch kills include/linux/eeprom.h .

Rationale:
- it was only used by one single driver
- even this driver didn't do anything useful with it
- most of this file are non-inline and non-static functions (sic)

This removes include/linux/eeprom.h and cleans drivers/net/ns83820.c up.

If you think eeprom.h should be used more extensively, please consider:
- the code has to be moved from the header file to a .c file
- the currently empty write function has to be implemented
- ns83820.c or any other driver should actually use it

Noone did any of these during the more than 3 years eeprom.h already
exists...

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Adrian Bunk authored and John W. Linville committed Nov 8, 2005
1 parent 8e3babc commit 48888cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 147 deletions.
13 changes: 2 additions & 11 deletions drivers/net/ns83820.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
#include <linux/init.h>
#include <linux/ip.h> /* for iph */
#include <linux/in.h> /* for IPPROTO_... */
#include <linux/eeprom.h>
#include <linux/compiler.h>
#include <linux/prefetch.h>
#include <linux/ethtool.h>
Expand Down Expand Up @@ -445,7 +444,6 @@ struct ns83820 {

u32 MEAR_cache;
u32 IMR_cache;
struct eeprom ee;

unsigned linkstate;

Expand Down Expand Up @@ -1558,15 +1556,13 @@ static void ns83820_getmac(struct ns83820 *dev, u8 *mac)
unsigned i;
for (i=0; i<3; i++) {
u32 data;
#if 0 /* I've left this in as an example of how to use eeprom.h */
data = eeprom_readw(&dev->ee, 0xa + 2 - i);
#else

/* Read from the perfect match memory: this is loaded by
* the chip from the EEPROM via the EELOAD self test.
*/
writel(i*2, dev->base + RFCR);
data = readl(dev->base + RFDR);
#endif

*mac++ = data;
*mac++ = data >> 8;
}
Expand Down Expand Up @@ -1851,8 +1847,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
spin_lock_init(&dev->misc_lock);
dev->pci_dev = pci_dev;

dev->ee.cache = &dev->MEAR_cache;
dev->ee.lock = &dev->misc_lock;
SET_MODULE_OWNER(ndev);
SET_NETDEV_DEV(ndev, &pci_dev->dev);

Expand Down Expand Up @@ -1887,9 +1881,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_

dev->IMR_cache = 0;

setup_ee_mem_bitbanger(&dev->ee, dev->base + MEAR, 3, 2, 1, 0,
0);

err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ,
DRV_NAME, ndev);
if (err) {
Expand Down
136 changes: 0 additions & 136 deletions include/linux/eeprom.h

This file was deleted.

0 comments on commit 48888cc

Please sign in to comment.