Skip to content

Commit b98cb4b

Browse files
committed
driver core: remove DEVICE_ID_SIZE define
There is no such thing as a "device id size" in the driver core, so remove the define and fix up any users of this odd define in the rest of the kernel. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent ca52a49 commit b98cb4b

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/memstick/host/jmb38x_ms.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct jmb38x_ms_host {
5151
void __iomem *addr;
5252
spinlock_t lock;
5353
int id;
54-
char host_id[DEVICE_ID_SIZE];
54+
char host_id[32];
5555
int irq;
5656
unsigned int block_pos;
5757
unsigned long timeout_jiffies;
@@ -781,7 +781,7 @@ static struct memstick_host *jmb38x_ms_alloc_host(struct jmb38x_ms *jm, int cnt)
781781

782782
spin_lock_init(&host->lock);
783783
host->id = cnt;
784-
snprintf(host->host_id, DEVICE_ID_SIZE, DRIVER_NAME ":slot%d",
784+
snprintf(host->host_id, sizeof(host->host_id), DRIVER_NAME ":slot%d",
785785
host->id);
786786
host->irq = jm->pdev->irq;
787787
host->timeout_jiffies = msecs_to_jiffies(1000);

‎include/linux/device.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <asm/atomic.h>
2626
#include <asm/device.h>
2727

28-
#define DEVICE_ID_SIZE 32
2928
#define BUS_ID_SIZE 20
3029

3130
struct device;

0 commit comments

Comments
 (0)