can anybody help

Hi all, I am getting the following warning while compiling the driver

static DEVICE_ATTR(sd_host_version,S_IRUGO,show_sd_host_version,NULL);

warning:initializing from incompitable pointer type.

whats wrong i am doing here can anyone help me in removing this warning.

I believe because of this when i am calling


sd_host_version is never getting called.

i will be very much thankful for any kind of help.

Regards Nayan

Reply to
Loading thread data ...

Has "show_sd_host_version()" the correct parameters and return type?

Maybe it could be a good idea to see what the precompiler builds from this macro usage. Simply run a (in your kernel source tree)

$ make where/your/driver/is/your_driver.i

and take a look into the generated "where/your/driver/is/your_driver.i" whats built.


Reply to
Juergen Beisert

Thanks for your help. I tried to check the result after issuing the command as you suggested $ make sdhost.i i am getting the following result make: *** No rule to make target 'sdhost.i'. Stop.

following is the defination of function "show_sd_host_version()"

static ssize_t show_sd_host_version(struct device *pDevice,char

*pBuff) { PSD_HOST pSdHost = (PSD_HOST)pDevice->driver_data:

return print_dev_t(pBuff,pSdHost->; }

Regards Nayan

Reply to


formatting link
select "identifier search", enter "DEVICE_ATTR" and hit "Find". Chose one of the location where this macro is used and take a look how others do it. For 2.6.25 I found:

ssize_t function (struct device *dev, struct device_attribute *attr, char


So this may explain the warning your compiler emits.


Reply to
Juergen Beisert

Thank you very much JB . Now that problem is coming.

another problem that i am facing is when i am trying to load sdhost module that time i am getting the following message.

sdhost: no version for "unregister_sd_host_device" found: kernel tainted.

while at the time of unloding the sdhost module unregister_sd_host_device() is getting called properly there is no problem at all.

i checked the symbol table file also there i am able to see the exported unregister_sd_host_device() function

unregister_sd_host_device() is defined in the sdbus module and from there i am exporting this function by using EXPORT_MODULE

while the same message is not coming for the register_sd_host_device().

i will be very much thankfull for any kind of help.


Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.