Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42789
b: refs/heads/master
c: 4740d38
h: refs/heads/master
i:
  42787: c640c6b
v: v3
  • Loading branch information
Hans-Christian Egtvedt authored and Linus Torvalds committed Dec 7, 2006
1 parent 19aad58 commit 49ea255
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ed2908f31398049c4371de9b100700e80704e95f
refs/heads/master: 4740d387f3cb9e63f48f2488815b38a2c92755c8
16 changes: 7 additions & 9 deletions trunk/drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,15 +465,13 @@ EXPORT_SYMBOL_GPL(spi_unregister_master);
*/
struct spi_master *spi_busnum_to_master(u16 bus_num)
{
if (bus_num) {
char name[8];
struct kobject *bus;

snprintf(name, sizeof name, "spi%u", bus_num);
bus = kset_find_obj(&spi_master_class.subsys.kset, name);
if (bus)
return container_of(bus, struct spi_master, cdev.kobj);
}
char name[9];
struct kobject *bus;

snprintf(name, sizeof name, "spi%u", bus_num);
bus = kset_find_obj(&spi_master_class.subsys.kset, name);
if (bus)
return container_of(bus, struct spi_master, cdev.kobj);
return NULL;
}
EXPORT_SYMBOL_GPL(spi_busnum_to_master);
Expand Down

0 comments on commit 49ea255

Please sign in to comment.