summaryrefslogtreecommitdiff
path: root/drivers/parport
diff options
context:
space:
mode:
authorJoel Granados <j.granados@samsung.com>2023-05-23 15:22:13 +0300
committerLuis Chamberlain <mcgrof@kernel.org>2023-05-24 07:43:25 +0300
commit7c0bf4dad6bf44eef4a573985dd053de77688df1 (patch)
tree58ad847ecf675d174d5020da88795e0452fa000a /drivers/parport
parentf1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6 (diff)
downloadlinux-7c0bf4dad6bf44eef4a573985dd053de77688df1.tar.xz
parport: Move magic number "15" to a define
Put the size of a parport name behind a define so we can use it in other files. This is a preparation patch to be able to use this size in parport/procfs.c. Signed-off-by: Joel Granados <j.granados@samsung.com> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'drivers/parport')
-rw-r--r--drivers/parport/share.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index 62f8407923d4..2d46b1d4fd69 100644
--- a/drivers/parport/share.c
+++ b/drivers/parport/share.c
@@ -467,7 +467,7 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma,
atomic_set(&tmp->ref_count, 1);
INIT_LIST_HEAD(&tmp->full_list);
- name = kmalloc(15, GFP_KERNEL);
+ name = kmalloc(PARPORT_NAME_MAX_LEN, GFP_KERNEL);
if (!name) {
kfree(tmp);
return NULL;