can anybody help - Embedded
This is a discussion on can anybody help - Embedded ; Hi all,
I am getting the following warning while compiling the
driver
static DEVICE_ATTR(sd_host_version,S_IRUGO,show_sd_host_v ersion,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 ...
-
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_v ersion,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
device_create_file(&dev,&dev_attr_sd_host_version);
sd_host_version is never getting called.
i will be very much thankful for any kind of help.
Regards
Nayan
-
Re: can anybody help
Nayan wrote:
> I am getting the following warning while compiling the
> driver
>
> static DEVICE_ATTR(sd_host_version,S_IRUGO,show_sd_host_v ersion,NULL);
>
> warning:initializing from incompitable pointer type.
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.
JB
-
Re: can anybody help
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->sd_host_cdev.dev);
}
Regards
Nayan
-
Re: can anybody help
Nayan wrote:
> 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->sd_host_cdev.dev);
> }
Visit http://lxr.free-electrons.com/, 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
*buf)
So this may explain the warning your compiler emits.
JB
-
Re: can anybody help
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.
Regards