1. 29 4月, 2010 3 次提交
    • G
      i2c/of: Allow device node to be passed via i2c_board_info · d12d42f7
      Grant Likely 提交于
      The struct device_node *of_node pointer is moving out of dev->archdata
      and into the struct device proper.  of_i2c.c needs to set the of_node
      pointer before the device is registered.  Since the i2c subsystem
      doesn't allow 2 stage allocation and registration of i2c devices, the
      of_node pointer needs to be passed via the i2c_board_info structure
      so that it is set prior to registration.
      
      This patch adds of_node to struct i2c_board_info (conditional on
      CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c
      to use the new parameter.  The calling of dev_archdata_set_node()
      from of_i2c will be removed in a subsequent patch when of_node is
      removed from archdata and all users are converted over.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      d12d42f7
    • G
      driver-core: Add device node pointer to struct device · d706c1b0
      Grant Likely 提交于
      Currently, platforms using CONFIG_OF add a 'struct device_node *of_node'
      to dev->archdata.  However, with CONFIG_OF becoming generic for all
      architectures, it makes sense for commonality to move it out of archdata
      and into struct device proper.
      
      This patch adds a struct device_node *of_node member to struct device
      and updates all locations which currently write the device_node pointer
      into archdata to also update dev->of_node.  Subsequent patches will
      modify callers to use the archdata location and ultimately remove
      the archdata member entirely.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Greg Kroah-Hartman <gregkh@suse.de>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: Jeremy Kerr <jeremy.kerr@canonical.com>
      CC: microblaze-uclinux@itee.uq.edu.au
      CC: linux-kernel@vger.kernel.org
      CC: linuxppc-dev@ozlabs.org
      CC: sparclinux@vger.kernel.org
      d706c1b0
    • G
      of/flattree: Make unflatten_device_tree() safe to call from any arch · 8bfe9b5c
      Grant Likely 提交于
      This patch makes unflatten_device_tree() safe to call from any arch
      setup code with the following changes:
      - Make sure initial_boot_params actually points to a device tree blob
        before unflattening
      - Make sure the initial_boot_params->magic field is correct
      - If CONFIG_OF_FLATTREE is not set, then make unflatten_device_tree()
        an empty static inline function.
      
      This patch also adds some additional debug output to the top of
      unflatten_device_tree().
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      8bfe9b5c
  2. 20 4月, 2010 1 次提交
  3. 19 4月, 2010 9 次提交
  4. 18 4月, 2010 1 次提交
  5. 17 4月, 2010 2 次提交
  6. 16 4月, 2010 5 次提交
  7. 14 4月, 2010 11 次提交
  8. 13 4月, 2010 5 次提交
  9. 12 4月, 2010 2 次提交
  10. 10 4月, 2010 1 次提交
    • S
      firewire: cdev: fix information leak · 9cac00b8
      Stefan Richter 提交于
      A userspace client got to see uninitialized stack-allocated memory if it
      specified an _IOC_READ type of ioctl and an argument size larger than
      expected by firewire-core's ioctl handlers (but not larger than the
      core's union ioctl_arg).
      
      Fix this by clearing the requested buffer size to zero, but only at _IOR
      ioctls.  This way, there is almost no runtime penalty to legitimate
      ioctls.  The only legitimate _IOR is FW_CDEV_IOC_GET_CYCLE_TIMER with 12
      or 16 bytes to memset.
      
      [Another way to fix this would be strict checking of argument size (and
      possibly direction) vs. command number.  However, we then need a lookup
      table, and we need to allow for slight size deviations in case of 32bit
      userland on 64bit kernel.]
      Reported-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      9cac00b8