*参照元 [#w10e5e38] #backlinks *説明 [#p1a100ae] -パス: [[linux-2.6.33/]] -パス: [[linux-2.6.33/drivers/base/platform.c]] -FIXME: これは何? --説明 **引数 [#y711ef9d] -struct platform_device *pdev -- --[[linux-2.6.33/platform_device]] -const void *data -- -size_t size -- **返り値 [#g5b84777] -int -- **参考 [#b4b9272c] *実装 [#h5c7ce6f] /** * platform_device_add_data * @pdev: platform device allocated by platform_device_alloc to add resources to * @data: platform specific data for this platform device * @size: size of platform specific data * * Add a copy of platform specific data to the platform device's * platform_data pointer. The memory associated with the platform data * will be freed when the platform device is released. */ int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size) { void *d = kmemdup(data, size, GFP_KERNEL); - --[[linux-2.6.33/kmemdup()]] - --[[linux-2.6.33/GFP_KERNEL]] if (d) { pdev->dev.platform_data = d; return 0; } return -ENOMEM; } EXPORT_SYMBOL_GPL(platform_device_add_data); -GPL のモジュールにのみシンボルを公開する。 --[[linux-2.6.33/EXPORT_SYMBOL_GPL()]] *コメント [#t932648b]