The prolific Spanish striker missed Real's 2-0 defeat by Valencia on Saturday because of a hip injury and he was rated doubtful for the Group F game away to Porto.
But he was able to join his teammates for a practice match on Tuesday and was later named in a 21 man squad for the trip.
Real will be without David Beckham after the England captain suffered an injury to the sole of his right foot against Valencia, but centre-back Ivan Helguera is back in the squad.
Real, nine times European Cup winners, are top of Group F after beating Olympique Marseille of France 4-2 in their opening match of the European campaign.
More from rediff