aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index e84d21597943..bcb8dd5fb0b4 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -67,14 +67,11 @@ static int spi_match_device(struct device *dev, struct device_driver *drv)
67 return strncmp(spi->modalias, drv->name, BUS_ID_SIZE) == 0; 67 return strncmp(spi->modalias, drv->name, BUS_ID_SIZE) == 0;
68} 68}
69 69
70static int spi_uevent(struct device *dev, char **envp, int num_envp, 70static int spi_uevent(struct device *dev, struct kobj_uevent_env *env)
71 char *buffer, int buffer_size)
72{ 71{
73 const struct spi_device *spi = to_spi_device(dev); 72 const struct spi_device *spi = to_spi_device(dev);
74 73
75 envp[0] = buffer; 74 add_uevent_var(env, "MODALIAS=%s", spi->modalias);
76 snprintf(buffer, buffer_size, "MODALIAS=%s", spi->modalias);
77 envp[1] = NULL;
78 return 0; 75 return 0;
79} 76}
80 77