mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
cdrom: make EXPORT_SYMBOL follow exported function
Currently, some EXPORT_SYMBOL declarations do not follow the exported function, which affects the readability of the code. To maintain consistency, move these EXPORT_SYMBOL declarations to the correct position to improve the readability of the code. Signed-off-by: Enze Li <lienze@kylinos.cn> Link: https://lore.kernel.org/all/20220406090337.1116708-1-lienze@kylinos.cn Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220515205833.944139-2-phil@philpotter.co.uk Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
c5eb0a6123
commit
eeef7565e8
@ -648,6 +648,7 @@ int register_cdrom(struct gendisk *disk, struct cdrom_device_info *cdi)
|
|||||||
mutex_unlock(&cdrom_mutex);
|
mutex_unlock(&cdrom_mutex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(register_cdrom);
|
||||||
#undef ENSURE
|
#undef ENSURE
|
||||||
|
|
||||||
void unregister_cdrom(struct cdrom_device_info *cdi)
|
void unregister_cdrom(struct cdrom_device_info *cdi)
|
||||||
@ -663,6 +664,7 @@ void unregister_cdrom(struct cdrom_device_info *cdi)
|
|||||||
|
|
||||||
cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name);
|
cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(unregister_cdrom);
|
||||||
|
|
||||||
int cdrom_get_media_event(struct cdrom_device_info *cdi,
|
int cdrom_get_media_event(struct cdrom_device_info *cdi,
|
||||||
struct media_event_desc *med)
|
struct media_event_desc *med)
|
||||||
@ -690,6 +692,7 @@ int cdrom_get_media_event(struct cdrom_device_info *cdi,
|
|||||||
memcpy(med, &buffer[sizeof(*eh)], sizeof(*med));
|
memcpy(med, &buffer[sizeof(*eh)], sizeof(*med));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(cdrom_get_media_event);
|
||||||
|
|
||||||
static int cdrom_get_random_writable(struct cdrom_device_info *cdi,
|
static int cdrom_get_random_writable(struct cdrom_device_info *cdi,
|
||||||
struct rwrt_feature_desc *rfd)
|
struct rwrt_feature_desc *rfd)
|
||||||
@ -1206,6 +1209,7 @@ int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev,
|
|||||||
cdi->use_count--;
|
cdi->use_count--;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(cdrom_open);
|
||||||
|
|
||||||
/* This code is similar to that in open_for_data. The routine is called
|
/* This code is similar to that in open_for_data. The routine is called
|
||||||
whenever an audio play operation is requested.
|
whenever an audio play operation is requested.
|
||||||
@ -1301,6 +1305,7 @@ void cdrom_release(struct cdrom_device_info *cdi, fmode_t mode)
|
|||||||
cdo->tray_move(cdi, 1);
|
cdo->tray_move(cdi, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(cdrom_release);
|
||||||
|
|
||||||
static int cdrom_read_mech_status(struct cdrom_device_info *cdi,
|
static int cdrom_read_mech_status(struct cdrom_device_info *cdi,
|
||||||
struct cdrom_changer_info *buf)
|
struct cdrom_changer_info *buf)
|
||||||
@ -1382,6 +1387,7 @@ int cdrom_number_of_slots(struct cdrom_device_info *cdi)
|
|||||||
kfree(info);
|
kfree(info);
|
||||||
return nslots;
|
return nslots;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(cdrom_number_of_slots);
|
||||||
|
|
||||||
|
|
||||||
/* If SLOT < 0, unload the current slot. Otherwise, try to load SLOT. */
|
/* If SLOT < 0, unload the current slot. Otherwise, try to load SLOT. */
|
||||||
@ -1581,6 +1587,7 @@ void init_cdrom_command(struct packet_command *cgc, void *buf, int len,
|
|||||||
cgc->data_direction = type;
|
cgc->data_direction = type;
|
||||||
cgc->timeout = CDROM_DEF_TIMEOUT;
|
cgc->timeout = CDROM_DEF_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(init_cdrom_command);
|
||||||
|
|
||||||
/* DVD handling */
|
/* DVD handling */
|
||||||
|
|
||||||
@ -1999,6 +2006,7 @@ int cdrom_mode_sense(struct cdrom_device_info *cdi,
|
|||||||
cgc->data_direction = CGC_DATA_READ;
|
cgc->data_direction = CGC_DATA_READ;
|
||||||
return cdo->generic_packet(cdi, cgc);
|
return cdo->generic_packet(cdi, cgc);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(cdrom_mode_sense);
|
||||||
|
|
||||||
int cdrom_mode_select(struct cdrom_device_info *cdi,
|
int cdrom_mode_select(struct cdrom_device_info *cdi,
|
||||||
struct packet_command *cgc)
|
struct packet_command *cgc)
|
||||||
@ -2014,6 +2022,7 @@ int cdrom_mode_select(struct cdrom_device_info *cdi,
|
|||||||
cgc->data_direction = CGC_DATA_WRITE;
|
cgc->data_direction = CGC_DATA_WRITE;
|
||||||
return cdo->generic_packet(cdi, cgc);
|
return cdo->generic_packet(cdi, cgc);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(cdrom_mode_select);
|
||||||
|
|
||||||
static int cdrom_read_subchannel(struct cdrom_device_info *cdi,
|
static int cdrom_read_subchannel(struct cdrom_device_info *cdi,
|
||||||
struct cdrom_subchnl *subchnl, int mcn)
|
struct cdrom_subchnl *subchnl, int mcn)
|
||||||
@ -2892,6 +2901,7 @@ int cdrom_get_last_written(struct cdrom_device_info *cdi, long *last_written)
|
|||||||
*last_written = toc.cdte_addr.lba;
|
*last_written = toc.cdte_addr.lba;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(cdrom_get_last_written);
|
||||||
|
|
||||||
/* return the next writable block. also for udf file system. */
|
/* return the next writable block. also for udf file system. */
|
||||||
static int cdrom_get_next_writable(struct cdrom_device_info *cdi,
|
static int cdrom_get_next_writable(struct cdrom_device_info *cdi,
|
||||||
@ -3429,18 +3439,7 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
|
|||||||
|
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_SYMBOL(cdrom_get_last_written);
|
|
||||||
EXPORT_SYMBOL(register_cdrom);
|
|
||||||
EXPORT_SYMBOL(unregister_cdrom);
|
|
||||||
EXPORT_SYMBOL(cdrom_open);
|
|
||||||
EXPORT_SYMBOL(cdrom_release);
|
|
||||||
EXPORT_SYMBOL(cdrom_ioctl);
|
EXPORT_SYMBOL(cdrom_ioctl);
|
||||||
EXPORT_SYMBOL(cdrom_number_of_slots);
|
|
||||||
EXPORT_SYMBOL(cdrom_mode_select);
|
|
||||||
EXPORT_SYMBOL(cdrom_mode_sense);
|
|
||||||
EXPORT_SYMBOL(init_cdrom_command);
|
|
||||||
EXPORT_SYMBOL(cdrom_get_media_event);
|
|
||||||
|
|
||||||
#ifdef CONFIG_SYSCTL
|
#ifdef CONFIG_SYSCTL
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user