Skip to content

Commit

Permalink
Drivers: block: remove __dev* attributes.
Browse files Browse the repository at this point in the history
CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <[email protected]>
Cc: Mike Miller <[email protected]>
Cc: Chirag Kantharia <[email protected]>
Cc: Geoff Levand <[email protected]>
Cc: Jim Paris <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Keith Busch <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: NeilBrown <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Tao Guo <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Jan 3, 2013
1 parent 0f58a01 commit 8d85fce
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 100 deletions.
90 changes: 43 additions & 47 deletions drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ static void cciss_geometry_inquiry(ctlr_info_t *h, int logvol,
sector_t total_size,
unsigned int block_size, InquiryData_struct *inq_buff,
drive_info_struct *drv);
static void __devinit cciss_interrupt_mode(ctlr_info_t *);
static int __devinit cciss_enter_simple_mode(struct ctlr_info *h);
static void cciss_interrupt_mode(ctlr_info_t *);
static int cciss_enter_simple_mode(struct ctlr_info *h);
static void start_io(ctlr_info_t *h);
static int sendcmd_withirq(ctlr_info_t *h, __u8 cmd, void *buff, size_t size,
__u8 page_code, unsigned char scsi3addr[],
Expand All @@ -199,14 +199,13 @@ static void cciss_device_release(struct device *dev);
static void cciss_free_gendisk(ctlr_info_t *h, int drv_index);
static void cciss_free_drive_info(ctlr_info_t *h, int drv_index);
static inline u32 next_command(ctlr_info_t *h);
static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev,
void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index,
u64 *cfg_offset);
static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev,
unsigned long *memory_bar);
static int cciss_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr,
u32 *cfg_base_addr, u64 *cfg_base_addr_index,
u64 *cfg_offset);
static int cciss_pci_find_memory_BAR(struct pci_dev *pdev,
unsigned long *memory_bar);
static inline u32 cciss_tag_discard_error_bits(ctlr_info_t *h, u32 tag);
static __devinit int write_driver_ver_to_cfgtable(
CfgTable_struct __iomem *cfgtable);
static int write_driver_ver_to_cfgtable(CfgTable_struct __iomem *cfgtable);

/* performant mode helper functions */
static void calc_bucket_map(int *bucket, int num_buckets, int nsgs,
Expand Down Expand Up @@ -550,7 +549,7 @@ static const struct file_operations cciss_proc_fops = {
.write = cciss_proc_write,
};

static void __devinit cciss_procinit(ctlr_info_t *h)
static void cciss_procinit(ctlr_info_t *h)
{
struct proc_dir_entry *pde;

Expand Down Expand Up @@ -2663,8 +2662,8 @@ static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff,
return status;
}

static int __devinit cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr,
u8 reset_type)
static int cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr,
u8 reset_type)
{
CommandList_struct *c;
int return_status;
Expand Down Expand Up @@ -3919,7 +3918,7 @@ static void calc_bucket_map(int bucket[], int num_buckets,
}
}

static void __devinit cciss_wait_for_mode_change_ack(ctlr_info_t *h)
static void cciss_wait_for_mode_change_ack(ctlr_info_t *h)
{
int i;

Expand All @@ -3933,8 +3932,7 @@ static void __devinit cciss_wait_for_mode_change_ack(ctlr_info_t *h)
}
}

static __devinit void cciss_enter_performant_mode(ctlr_info_t *h,
u32 use_short_tags)
static void cciss_enter_performant_mode(ctlr_info_t *h, u32 use_short_tags)
{
/* This is a bit complicated. There are 8 registers on
* the controller which we write to to tell it 8 different
Expand Down Expand Up @@ -4000,7 +3998,7 @@ static __devinit void cciss_enter_performant_mode(ctlr_info_t *h,
" performant mode\n");
}

static void __devinit cciss_put_controller_into_performant_mode(ctlr_info_t *h)
static void cciss_put_controller_into_performant_mode(ctlr_info_t *h)
{
__u32 trans_support;

Expand Down Expand Up @@ -4062,7 +4060,7 @@ static void __devinit cciss_put_controller_into_performant_mode(ctlr_info_t *h)
* controllers that are capable. If not, we use IO-APIC mode.
*/

static void __devinit cciss_interrupt_mode(ctlr_info_t *h)
static void cciss_interrupt_mode(ctlr_info_t *h)
{
#ifdef CONFIG_PCI_MSI
int err;
Expand Down Expand Up @@ -4108,7 +4106,7 @@ static void __devinit cciss_interrupt_mode(ctlr_info_t *h)
return;
}

static int __devinit cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
static int cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
{
int i;
u32 subsystem_vendor_id, subsystem_device_id;
Expand All @@ -4134,8 +4132,8 @@ static inline bool cciss_board_disabled(ctlr_info_t *h)
return ((command & PCI_COMMAND_MEMORY) == 0);
}

static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev,
unsigned long *memory_bar)
static int cciss_pci_find_memory_BAR(struct pci_dev *pdev,
unsigned long *memory_bar)
{
int i;

Expand All @@ -4151,8 +4149,8 @@ static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev,
return -ENODEV;
}

static int __devinit cciss_wait_for_board_state(struct pci_dev *pdev,
void __iomem *vaddr, int wait_for_ready)
static int cciss_wait_for_board_state(struct pci_dev *pdev,
void __iomem *vaddr, int wait_for_ready)
#define BOARD_READY 1
#define BOARD_NOT_READY 0
{
Expand All @@ -4179,9 +4177,9 @@ static int __devinit cciss_wait_for_board_state(struct pci_dev *pdev,
return -ENODEV;
}

static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev,
void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index,
u64 *cfg_offset)
static int cciss_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr,
u32 *cfg_base_addr, u64 *cfg_base_addr_index,
u64 *cfg_offset)
{
*cfg_base_addr = readl(vaddr + SA5_CTCFG_OFFSET);
*cfg_offset = readl(vaddr + SA5_CTMEM_OFFSET);
Expand All @@ -4195,7 +4193,7 @@ static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev,
return 0;
}

static int __devinit cciss_find_cfgtables(ctlr_info_t *h)
static int cciss_find_cfgtables(ctlr_info_t *h)
{
u64 cfg_offset;
u32 cfg_base_addr;
Expand Down Expand Up @@ -4224,7 +4222,7 @@ static int __devinit cciss_find_cfgtables(ctlr_info_t *h)
return 0;
}

static void __devinit cciss_get_max_perf_mode_cmds(struct ctlr_info *h)
static void cciss_get_max_perf_mode_cmds(struct ctlr_info *h)
{
h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands));

Expand All @@ -4245,7 +4243,7 @@ static void __devinit cciss_get_max_perf_mode_cmds(struct ctlr_info *h)
* max commands, max SG elements without chaining, and with chaining,
* SG chain block size, etc.
*/
static void __devinit cciss_find_board_params(ctlr_info_t *h)
static void cciss_find_board_params(ctlr_info_t *h)
{
cciss_get_max_perf_mode_cmds(h);
h->nr_cmds = h->max_commands - 4 - cciss_tape_cmds;
Expand Down Expand Up @@ -4304,7 +4302,7 @@ static inline void cciss_p600_dma_prefetch_quirk(ctlr_info_t *h)
pci_write_config_dword(h->pdev, PCI_COMMAND_PARITY, dma_refetch);
}

static int __devinit cciss_pci_init(ctlr_info_t *h)
static int cciss_pci_init(ctlr_info_t *h)
{
int prod_index, err;

Expand Down Expand Up @@ -4424,7 +4422,8 @@ static void free_hba(ctlr_info_t *h)
}

/* Send a message CDB to the firmware. */
static __devinit int cciss_message(struct pci_dev *pdev, unsigned char opcode, unsigned char type)
static int cciss_message(struct pci_dev *pdev, unsigned char opcode,
unsigned char type)
{
typedef struct {
CommandListHeader_struct CommandHeader;
Expand Down Expand Up @@ -4571,14 +4570,13 @@ static int cciss_controller_hard_reset(struct pci_dev *pdev,
return 0;
}

static __devinit void init_driver_version(char *driver_version, int len)
static void init_driver_version(char *driver_version, int len)
{
memset(driver_version, 0, len);
strncpy(driver_version, "cciss " DRIVER_NAME, len - 1);
}

static __devinit int write_driver_ver_to_cfgtable(
CfgTable_struct __iomem *cfgtable)
static int write_driver_ver_to_cfgtable(CfgTable_struct __iomem *cfgtable)
{
char *driver_version;
int i, size = sizeof(cfgtable->driver_version);
Expand All @@ -4594,17 +4592,16 @@ static __devinit int write_driver_ver_to_cfgtable(
return 0;
}

static __devinit void read_driver_ver_from_cfgtable(
CfgTable_struct __iomem *cfgtable, unsigned char *driver_ver)
static void read_driver_ver_from_cfgtable(CfgTable_struct __iomem *cfgtable,
unsigned char *driver_ver)
{
int i;

for (i = 0; i < sizeof(cfgtable->driver_version); i++)
driver_ver[i] = readb(&cfgtable->driver_version[i]);
}

static __devinit int controller_reset_failed(
CfgTable_struct __iomem *cfgtable)
static int controller_reset_failed(CfgTable_struct __iomem *cfgtable)
{

char *driver_ver, *old_driver_ver;
Expand All @@ -4627,7 +4624,7 @@ static __devinit int controller_reset_failed(

/* This does a hard reset of the controller using PCI power management
* states or using the doorbell register. */
static __devinit int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
static int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
{
u64 cfg_offset;
u32 cfg_base_addr;
Expand Down Expand Up @@ -4772,7 +4769,7 @@ static __devinit int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
return rc;
}

static __devinit int cciss_init_reset_devices(struct pci_dev *pdev)
static int cciss_init_reset_devices(struct pci_dev *pdev)
{
int rc, i;

Expand Down Expand Up @@ -4806,7 +4803,7 @@ static __devinit int cciss_init_reset_devices(struct pci_dev *pdev)
return 0;
}

static __devinit int cciss_allocate_cmd_pool(ctlr_info_t *h)
static int cciss_allocate_cmd_pool(ctlr_info_t *h)
{
h->cmd_pool_bits = kmalloc(BITS_TO_LONGS(h->nr_cmds) *
sizeof(unsigned long), GFP_KERNEL);
Expand All @@ -4825,7 +4822,7 @@ static __devinit int cciss_allocate_cmd_pool(ctlr_info_t *h)
return 0;
}

static __devinit int cciss_allocate_scatterlists(ctlr_info_t *h)
static int cciss_allocate_scatterlists(ctlr_info_t *h)
{
int i;

Expand Down Expand Up @@ -4893,7 +4890,7 @@ static int cciss_request_irq(ctlr_info_t *h,
return -1;
}

static int __devinit cciss_kdump_soft_reset(ctlr_info_t *h)
static int cciss_kdump_soft_reset(ctlr_info_t *h)
{
if (cciss_send_reset(h, CTLR_LUNID, CCISS_RESET_TYPE_CONTROLLER)) {
dev_warn(&h->pdev->dev, "Resetting array controller failed.\n");
Expand Down Expand Up @@ -4952,8 +4949,7 @@ static void cciss_undo_allocations_after_kdump_soft_reset(ctlr_info_t *h)
* stealing all these major device numbers.
* returns the number of block devices registered.
*/
static int __devinit cciss_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
static int cciss_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
int i;
int j = 0;
Expand Down Expand Up @@ -5207,7 +5203,7 @@ static void cciss_shutdown(struct pci_dev *pdev)
free_irq(h->intr[h->intr_mode], h);
}

static int __devinit cciss_enter_simple_mode(struct ctlr_info *h)
static int cciss_enter_simple_mode(struct ctlr_info *h)
{
u32 trans_support;

Expand All @@ -5229,7 +5225,7 @@ static int __devinit cciss_enter_simple_mode(struct ctlr_info *h)
}


static void __devexit cciss_remove_one(struct pci_dev *pdev)
static void cciss_remove_one(struct pci_dev *pdev)
{
ctlr_info_t *h;
int i, j;
Expand Down Expand Up @@ -5308,7 +5304,7 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
static struct pci_driver cciss_pci_driver = {
.name = "cciss",
.probe = cciss_init_one,
.remove = __devexit_p(cciss_remove_one),
.remove = cciss_remove_one,
.id_table = cciss_pci_device_id, /* id_table */
.shutdown = cciss_shutdown,
};
Expand Down
16 changes: 8 additions & 8 deletions drivers/block/cpqarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static void release_io_mem(ctlr_info_t *c)
c->io_mem_length = 0;
}

static void __devexit cpqarray_remove_one(int i)
static void cpqarray_remove_one(int i)
{
int j;
char buff[4];
Expand Down Expand Up @@ -352,7 +352,7 @@ static void __devexit cpqarray_remove_one(int i)
free_hba(i);
}

static void __devexit cpqarray_remove_one_pci (struct pci_dev *pdev)
static void cpqarray_remove_one_pci(struct pci_dev *pdev)
{
int i;
ctlr_info_t *tmp_ptr;
Expand All @@ -377,7 +377,7 @@ static void __devexit cpqarray_remove_one_pci (struct pci_dev *pdev)
/* removing an instance that was not removed automatically..
* must be an eisa card.
*/
static void __devexit cpqarray_remove_one_eisa (int i)
static void cpqarray_remove_one_eisa(int i)
{
if (hba[i] == NULL) {
printk(KERN_ERR "cpqarray: controller %d appears to have"
Expand All @@ -388,7 +388,7 @@ static void __devexit cpqarray_remove_one_eisa (int i)
}

/* pdev is NULL for eisa */
static int __devinit cpqarray_register_ctlr( int i, struct pci_dev *pdev)
static int cpqarray_register_ctlr(int i, struct pci_dev *pdev)
{
struct request_queue *q;
int j;
Expand Down Expand Up @@ -505,8 +505,8 @@ static int __devinit cpqarray_register_ctlr( int i, struct pci_dev *pdev)
return -1;
}

static int __devinit cpqarray_init_one( struct pci_dev *pdev,
const struct pci_device_id *ent)
static int cpqarray_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
int i;

Expand Down Expand Up @@ -536,7 +536,7 @@ static int __devinit cpqarray_init_one( struct pci_dev *pdev,
static struct pci_driver cpqarray_pci_driver = {
.name = "cpqarray",
.probe = cpqarray_init_one,
.remove = __devexit_p(cpqarray_remove_one_pci),
.remove = cpqarray_remove_one_pci,
.id_table = cpqarray_pci_device_id,
};

Expand Down Expand Up @@ -742,7 +742,7 @@ __setup("smart2=", cpqarray_setup);
/*
* Find an EISA controller's signature. Set up an hba if we find it.
*/
static int __devinit cpqarray_eisa_detect(void)
static int cpqarray_eisa_detect(void)
{
int i=0, j;
__u32 board_id;
Expand Down
Loading

0 comments on commit 8d85fce

Please sign in to comment.