@@ -753,6 +753,34 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
}
+static int m25p80_notifier_call(struct notifier_block *nb,
+ unsigned long event, void *__dev)
+{
+ printk("%s %d event = 0x%x:\n", __func__, __LINE__, event);
+ switch (event) {
+ case BUS_NOTIFY_ADD_DEVICE:
+ printk("BUS_NOTIFY_ADD_DEVICE\n");
+ break;
+ case BUS_NOTIFY_DEL_DEVICE:
+ printk("BUS_NOTIFY_DEL_DEVICE\n");
+ break;
+ case BUS_NOTIFY_BOUND_DRIVER:
+ printk("BUS_NOTIFY_BOUND_DRIVER\n");
+ break;
+ case BUS_NOTIFY_UNBIND_DRIVER:
+ printk("BUS_NOTIFY_UNBIND_DRIVER\n");
+ break;
+ case BUS_NOTIFY_UNBOUND_DRIVER:
+ printk("BUS_NOTIFY_UNBOUND_DRIVER\n");
+ break;
+ }
+ return NOTIFY_DONE;
+}
+
+static struct notifier_block m25p80_nb = {
+ .notifier_call = m25p80_notifier_call,
+};
+
/*
* board specific setup should have ensured the SPI clock used here
* matches what the READ command supports, at least until this driver
@@ -766,6 +794,8 @@ static int __devinit m25p_probe(struct spi_device *spi)