)]}'
{
  "commit": "e48880e02e7e7ead9daa47fe3a20486f550668d3",
  "tree": "e46cb1788109caf59fcb77453dffd43fec6e305e",
  "parents": [
    "7d455e0030eeab820773e7786605be4d9e56a04b"
  ],
  "author": {
    "name": "David Brownell",
    "email": "dbrownell@users.sourceforge.net",
    "time": "Fri Aug 15 00:40:44 2008 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Aug 15 08:35:44 2008 -0700"
  },
  "message": "spi: bugfix spi_add_device() with duplicate chipselects\n\nWhen reviewing a recent patch I noticed a potential trouble spot in the\nregistration of new SPI devices.  The SPI master driver is told to set\nthe device up before adding it to the driver model, so that it\u0027s always\nproperly set up when probe() is called.  (This is important, because in\nthe case of inverted chipselects, this device can make the bus misbehave\nuntil it\u0027s properly deselected.  It\u0027s got to be set up even if no driver\nbinds to the device.)\n\nThe trouble spot is that it doesn\u0027t first verify that no other device\nhas been added using that chipselect.  If such a device has been added,\nits configuration gets trashed.  (Fortunately this has not been a common\nerror!)\n\nThe fix here adds an explicit check, and a mutex to protect the relevant\ncritical region.\n\n[akpm@linux-foundation.org: make the lock local to spi_add_device()]\nSigned-off-by: David Brownell \u003cdbrownell@users.sourceforge.net\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "964124b60db2560b12f15d08dbdeeff43a058e16",
      "old_mode": 33188,
      "old_path": "drivers/spi/spi.c",
      "new_id": "75e86865234c924a67bb94d39c3fc259a6925b5a",
      "new_mode": 33188,
      "new_path": "drivers/spi/spi.c"
    }
  ]
}
